File tree 15 files changed +402
-9
lines changed
15 files changed +402
-9
lines changed Original file line number Diff line number Diff line change 44
44
"roumen/feed" : " ^2.10.4"
45
45
},
46
46
"require-dev" : {
47
- "alt-three/testbench" : " ^1.7 " ,
47
+ "alt-three/testbench" : " ^1.8 " ,
48
48
"filp/whoops" : " ^2.1" ,
49
49
"fzaninotto/faker" : " ^1.6" ,
50
50
"graham-campbell/testbench-core" : " ^1.1" ,
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Models ;
13
+
14
+ use AltThree \TestBench \ValidationTrait ;
15
+ use CachetHQ \Cachet \Models \ComponentGroup ;
16
+ use CachetHQ \Tests \Cachet \AbstractTestCase ;
17
+
18
+ /**
19
+ * This is the component group model test class.
20
+ *
21
+ * @author Graham Campbell <graham@alt-three.com>
22
+ */
23
+ class ComponentGroupTest extends AbstractTestCase
24
+ {
25
+ use ValidationTrait;
26
+
27
+ public function testValidation ()
28
+ {
29
+ $ this ->checkRules (new ComponentGroup ());
30
+ }
31
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Models ;
13
+
14
+ use AltThree \TestBench \ValidationTrait ;
15
+ use CachetHQ \Cachet \Models \Component ;
16
+ use CachetHQ \Tests \Cachet \AbstractTestCase ;
17
+
18
+ /**
19
+ * This is the component model test class.
20
+ *
21
+ * @author Graham Campbell <graham@alt-three.com>
22
+ */
23
+ class ComponentTest extends AbstractTestCase
24
+ {
25
+ use ValidationTrait;
26
+
27
+ public function testValidation ()
28
+ {
29
+ $ this ->checkRules (new Component ());
30
+ }
31
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Models ;
13
+
14
+ use AltThree \TestBench \ValidationTrait ;
15
+ use CachetHQ \Cachet \Models \IncidentTemplate ;
16
+ use CachetHQ \Tests \Cachet \AbstractTestCase ;
17
+
18
+ /**
19
+ * This is the incident template model test class.
20
+ *
21
+ * @author Graham Campbell <graham@alt-three.com>
22
+ */
23
+ class IncidentTemplateTest extends AbstractTestCase
24
+ {
25
+ use ValidationTrait;
26
+
27
+ public function testValidation ()
28
+ {
29
+ $ this ->checkRules (new IncidentTemplate ());
30
+ }
31
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Models ;
13
+
14
+ use AltThree \TestBench \ValidationTrait ;
15
+ use CachetHQ \Cachet \Models \Incident ;
16
+ use CachetHQ \Tests \Cachet \AbstractTestCase ;
17
+
18
+ /**
19
+ * This is the incident model test class.
20
+ *
21
+ * @author Graham Campbell <graham@alt-three.com>
22
+ */
23
+ class IncidentTest extends AbstractTestCase
24
+ {
25
+ use ValidationTrait;
26
+
27
+ public function testValidation ()
28
+ {
29
+ $ this ->checkRules (new Incident ());
30
+ }
31
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Models ;
13
+
14
+ use CachetHQ \Cachet \Models \Invite ;
15
+ use CachetHQ \Tests \Cachet \AbstractTestCase ;
16
+
17
+ /**
18
+ * This is the invite model test class.
19
+ *
20
+ * @author Graham Campbell <graham@alt-three.com>
21
+ */
22
+ class InviteTest extends AbstractTestCase
23
+ {
24
+ public function testValidation ()
25
+ {
26
+ $ this ->assertFalse (property_exists (new Invite (), 'rules ' ));
27
+ }
28
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Models ;
13
+
14
+ use AltThree \TestBench \ValidationTrait ;
15
+ use CachetHQ \Cachet \Models \MetricPoint ;
16
+ use CachetHQ \Tests \Cachet \AbstractTestCase ;
17
+
18
+ /**
19
+ * This is the metric point model test class.
20
+ *
21
+ * @author Graham Campbell <graham@alt-three.com>
22
+ */
23
+ class MetricPointTest extends AbstractTestCase
24
+ {
25
+ use ValidationTrait;
26
+
27
+ public function testValidation ()
28
+ {
29
+ $ this ->checkRules (new MetricPoint ());
30
+ }
31
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Models ;
13
+
14
+ use AltThree \TestBench \ValidationTrait ;
15
+ use CachetHQ \Cachet \Models \Metric ;
16
+ use CachetHQ \Tests \Cachet \AbstractTestCase ;
17
+
18
+ /**
19
+ * This is the metric model test class.
20
+ *
21
+ * @author Graham Campbell <graham@alt-three.com>
22
+ */
23
+ class MetricTest extends AbstractTestCase
24
+ {
25
+ use ValidationTrait;
26
+
27
+ public function testValidation ()
28
+ {
29
+ $ this ->checkRules (new Metric ());
30
+ }
31
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Models ;
13
+
14
+ use AltThree \TestBench \ExistenceTrait ;
15
+ use PHPUnit_Framework_TestCase as TestCase ;
16
+
17
+ /**
18
+ * This is the model existence test class.
19
+ *
20
+ * @author Graham Campbell <graham@alt-three.com>
21
+ */
22
+ class ModelExistenceTest extends TestCase
23
+ {
24
+ use ExistenceTrait;
25
+
26
+ protected function getSourcePath ()
27
+ {
28
+ return realpath (__DIR__ .'/../../app/Models ' );
29
+ }
30
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Models ;
13
+
14
+ use CachetHQ \Cachet \Models \Setting ;
15
+ use CachetHQ \Tests \Cachet \AbstractTestCase ;
16
+
17
+ /**
18
+ * This is the setting model test class.
19
+ *
20
+ * @author Graham Campbell <graham@alt-three.com>
21
+ */
22
+ class SettingTest extends AbstractTestCase
23
+ {
24
+ public function testValidation ()
25
+ {
26
+ $ this ->assertFalse (property_exists (new Setting (), 'rules ' ));
27
+ }
28
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Cachet.
5
+ *
6
+ * (c) Alt Three Services Limited
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace CachetHQ \Tests \Cachet \Models ;
13
+
14
+ use AltThree \TestBench \ValidationTrait ;
15
+ use CachetHQ \Cachet \Models \Subscriber ;
16
+ use CachetHQ \Tests \Cachet \AbstractTestCase ;
17
+
18
+ /**
19
+ * This is the subscriber model test class.
20
+ *
21
+ * @author Graham Campbell <graham@alt-three.com>
22
+ */
23
+ class SubscriberTest extends AbstractTestCase
24
+ {
25
+ use ValidationTrait;
26
+
27
+ public function testValidation ()
28
+ {
29
+ $ this ->checkRules (new Subscriber ());
30
+ }
31
+ }
You can’t perform that action at this time.
0 commit comments