File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919namespace App \Test \TestCase \Controller ;
2020
2121use App \Model \Table \DevelopersTable ;
22+ use App \Test \Fixture \DevelopersFixture ;
23+ use App \Test \Fixture \NotificationsFixture ;
2224use Cake \ORM \TableRegistry ;
2325use Cake \TestSuite \IntegrationTestTrait ;
2426use Cake \TestSuite \TestCase ;
@@ -39,16 +41,17 @@ class DevelopersControllerTest extends TestCase
3941
4042 protected DevelopersTable $ Developers ;
4143
42- /**
43- * Fixtures.
44- */
45- public array $ fixtures = [
46- ' app.Developers ' ,
47- ' app.Notifications ' ,
48- ];
44+ public function getFixtures (): array
45+ {
46+ return [
47+ NotificationsFixture::class,
48+ DevelopersFixture::class ,
49+ ];
50+ }
4951
5052 public function setUp (): void
5153 {
54+ parent ::setUp ();
5255 $ this ->Developers = TableRegistry::getTableLocator ()->get ('Developers ' );
5356 }
5457
Original file line number Diff line number Diff line change 33namespace App \Test \TestCase \Controller ;
44
55use App \Model \Table \ReportsTable ;
6+ use App \Test \Fixture \ReportsFixture ;
67use Cake \ORM \TableRegistry ;
78use Cake \TestSuite \IntegrationTestTrait ;
89use Cake \TestSuite \TestCase ;
@@ -15,13 +16,16 @@ class EventsControllerTest extends TestCase
1516
1617 protected ReportsTable $ Reports ;
1718
18- /**
19- * Fixtures.
20- */
21- public array $ fixtures = ['app.Reports ' ];
19+ public function getFixtures (): array
20+ {
21+ return [
22+ ReportsFixture::class,
23+ ];
24+ }
2225
2326 public function setUp (): void
2427 {
28+ parent ::setUp ();
2529 $ this ->Reports = TableRegistry::getTableLocator ()->get ('Reports ' );
2630 }
2731
Original file line number Diff line number Diff line change 1919namespace App \Test \TestCase \Controller ;
2020
2121use App \Model \Table \ReportsTable ;
22+ use App \Test \Fixture \DevelopersFixture ;
23+ use App \Test \Fixture \IncidentsFixture ;
24+ use App \Test \Fixture \NotificationsFixture ;
25+ use App \Test \Fixture \ReportsFixture ;
2226use Cake \Core \Configure ;
2327use Cake \ORM \TableRegistry ;
2428use Cake \TestSuite \IntegrationTestTrait ;
@@ -41,18 +45,19 @@ class GithubControllerTest extends TestCase
4145
4246 protected ReportsTable $ Reports ;
4347
44- /**
45- * Fixtures.
46- */
47- public array $ fixtures = [
48- ' app.Reports ' ,
49- ' app.Developers ' ,
50- ' app.Incidents ' ,
51- ' app.Notifications ' ,
52- ];
48+ public function getFixtures (): array
49+ {
50+ return [
51+ NotificationsFixture::class,
52+ DevelopersFixture::class ,
53+ ReportsFixture::class ,
54+ IncidentsFixture::class ,
55+ ];
56+ }
5357
5458 public function setUp (): void
5559 {
60+ parent ::setUp ();
5661 $ this ->session (['Developer.id ' => 1 , 'access_token ' => 'abc ' ]);
5762 $ this ->Reports = TableRegistry::getTableLocator ()->get ('Reports ' );
5863 }
Original file line number Diff line number Diff line change 44
55use App \Model \Table \IncidentsTable ;
66use App \Model \Table \ReportsTable ;
7+ use App \Test \Fixture \DevelopersFixture ;
8+ use App \Test \Fixture \IncidentsFixture ;
9+ use App \Test \Fixture \NotificationsFixture ;
10+ use App \Test \Fixture \ReportsFixture ;
711use Cake \Core \Configure ;
812use Cake \ORM \TableRegistry ;
913use Cake \TestSuite \EmailTrait ;
@@ -24,18 +28,19 @@ class IncidentsControllerTest extends TestCase
2428 protected IncidentsTable $ Incidents ;
2529 protected ReportsTable $ Reports ;
2630
27- /**
28- * Fixtures.
29- */
30- public array $ fixtures = [
31- ' app.Notifications ' ,
32- ' app.Developers ' ,
33- ' app.Reports ' ,
34- ' app.Incidents ' ,
35- ];
31+ public function getFixtures (): array
32+ {
33+ return [
34+ NotificationsFixture::class,
35+ DevelopersFixture::class ,
36+ ReportsFixture::class ,
37+ IncidentsFixture::class ,
38+ ];
39+ }
3640
3741 public function setUp (): void
3842 {
43+ parent ::setUp ();
3944 $ this ->Incidents = TableRegistry::getTableLocator ()->get ('Incidents ' );
4045 //$Session = new SessionComponent(new ComponentRegistry());
4146 $ this ->session (['Developer.id ' => 1 ]);
Original file line number Diff line number Diff line change 33namespace App \Test \TestCase \Controller ;
44
55use App \Model \Table \NotificationsTable ;
6+ use App \Test \Fixture \DevelopersFixture ;
7+ use App \Test \Fixture \IncidentsFixture ;
8+ use App \Test \Fixture \NotificationsFixture ;
9+ use App \Test \Fixture \ReportsFixture ;
610use Cake \ORM \TableRegistry ;
711use Cake \TestSuite \IntegrationTestTrait ;
812use Cake \TestSuite \TestCase ;
@@ -18,18 +22,19 @@ class NotificationsControllerTest extends TestCase
1822
1923 protected NotificationsTable $ Notifications ;
2024
21- /**
22- * Fixtures.
23- */
24- public array $ fixtures = [
25- ' app.Notifications ' ,
26- ' app.Developers ' ,
27- ' app.Reports ' ,
28- ' app.Incidents ' ,
29- ];
25+ public function getFixtures (): array
26+ {
27+ return [
28+ NotificationsFixture::class,
29+ DevelopersFixture::class ,
30+ ReportsFixture::class ,
31+ IncidentsFixture::class ,
32+ ];
33+ }
3034
3135 public function setUp (): void
3236 {
37+ parent ::setUp ();
3338 $ this ->Notifications = TableRegistry::getTableLocator ()->get ('Notifications ' );
3439 $ this ->session (['Developer.id ' => 1 , 'read_only ' => true ]);
3540 }
Original file line number Diff line number Diff line change 33namespace App \Test \TestCase \Controller ;
44
55use App \Model \Table \ReportsTable ;
6+ use App \Test \Fixture \DevelopersFixture ;
7+ use App \Test \Fixture \IncidentsFixture ;
8+ use App \Test \Fixture \NotificationsFixture ;
9+ use App \Test \Fixture \ReportsFixture ;
610use Cake \ORM \TableRegistry ;
711use Cake \TestSuite \IntegrationTestTrait ;
812use Cake \TestSuite \TestCase ;
@@ -16,18 +20,19 @@ class ReportsControllerTest extends TestCase
1620
1721 protected ReportsTable $ Reports ;
1822
19- /**
20- * Fixtures.
21- */
22- public array $ fixtures = [
23- ' app.Notifications ' ,
24- ' app.Developers ' ,
25- ' app.Reports ' ,
26- ' app.Incidents ' ,
27- ];
23+ public function getFixtures (): array
24+ {
25+ return [
26+ NotificationsFixture::class,
27+ DevelopersFixture::class ,
28+ ReportsFixture::class ,
29+ IncidentsFixture::class ,
30+ ];
31+ }
2832
2933 public function setUp (): void
3034 {
35+ parent ::setUp ();
3136 $ this ->Reports = TableRegistry::getTableLocator ()->get ('Reports ' );
3237 $ this ->session (['Developer.id ' => 1 ]);
3338 }
Original file line number Diff line number Diff line change 1919namespace App \Test \TestCase \Model \Table ;
2020
2121use App \Model \Table \DevelopersTable ;
22+ use App \Test \Fixture \DevelopersFixture ;
2223use Cake \Datasource \Exception \RecordNotFoundException ;
2324use Cake \ORM \TableRegistry ;
2425use Cake \TestSuite \TestCase ;
@@ -30,10 +31,12 @@ class DevelopersTableTest extends TestCase
3031{
3132 protected DevelopersTable $ Developers ;
3233
33- /**
34- * Fixtures.
35- */
36- public array $ fixtures = ['app.Developers ' ];
34+ public function getFixtures (): array
35+ {
36+ return [
37+ DevelopersFixture::class,
38+ ];
39+ }
3740
3841 /**
3942 * setUp method
Original file line number Diff line number Diff line change 33namespace App \Test \TestCase \Model \Table ;
44
55use App \Model \Table \IncidentsTable ;
6+ use App \Test \Fixture \DevelopersFixture ;
7+ use App \Test \Fixture \IncidentsFixture ;
8+ use App \Test \Fixture \NotificationsFixture ;
9+ use App \Test \Fixture \ReportsFixture ;
610use Cake \ORM \TableRegistry ;
711use Cake \TestSuite \TestCase ;
812use PHPUnit \Framework \Attributes \DataProvider ;
@@ -19,15 +23,15 @@ class IncidentsTableTest extends TestCase
1923{
2024 protected IncidentsTable $ Incidents ;
2125
22- /**
23- * Fixtures.
24- */
25- public array $ fixtures = [
26- ' app.Notifications ' ,
27- ' app.Developers ' ,
28- ' app.Reports ' ,
29- ' app.Incidents ' ,
30- ];
26+ public function getFixtures (): array
27+ {
28+ return [
29+ NotificationsFixture::class,
30+ DevelopersFixture::class ,
31+ ReportsFixture::class ,
32+ IncidentsFixture::class ,
33+ ];
34+ }
3135
3236 public function setUp (): void
3337 {
Original file line number Diff line number Diff line change 33namespace App \Test \TestCase \Model \Table ;
44
55use App \Model \Table \NotificationsTable ;
6+ use App \Test \Fixture \DevelopersFixture ;
7+ use App \Test \Fixture \IncidentsFixture ;
8+ use App \Test \Fixture \NotificationsFixture ;
9+ use App \Test \Fixture \ReportsFixture ;
610use Cake \ORM \TableRegistry ;
711use Cake \TestSuite \TestCase ;
812
@@ -15,15 +19,15 @@ class NotificationsTableTest extends TestCase
1519{
1620 protected NotificationsTable $ Notifications ;
1721
18- /**
19- * Fixtures.
20- */
21- public array $ fixtures = [
22- ' app.Notifications ' ,
23- ' app.Developers ' ,
24- ' app.Reports ' ,
25- ' app.Incidents ' ,
26- ];
22+ public function getFixtures (): array
23+ {
24+ return [
25+ NotificationsFixture::class,
26+ DevelopersFixture::class ,
27+ ReportsFixture::class ,
28+ IncidentsFixture::class ,
29+ ];
30+ }
2731
2832 /**
2933 * setUp method.
Original file line number Diff line number Diff line change 33namespace App \Test \TestCase \Model \Table ;
44
55use App \Model \Table \ReportsTable ;
6+ use App \Test \Fixture \DevelopersFixture ;
7+ use App \Test \Fixture \IncidentsFixture ;
8+ use App \Test \Fixture \NotificationsFixture ;
9+ use App \Test \Fixture \ReportsFixture ;
610use Cake \ORM \Query ;
711use Cake \ORM \ResultSet ;
812use Cake \ORM \TableRegistry ;
@@ -14,15 +18,15 @@ class ReportsTableTest extends TestCase
1418{
1519 protected ReportsTable $ Reports ;
1620
17- /**
18- * Fixtures.
19- */
20- public array $ fixtures = [
21- ' app.Notifications ' ,
22- ' app.Developers ' ,
23- ' app.Reports ' ,
24- ' app.Incidents ' ,
25- ];
21+ public function getFixtures (): array
22+ {
23+ return [
24+ NotificationsFixture::class,
25+ DevelopersFixture::class ,
26+ ReportsFixture::class ,
27+ IncidentsFixture::class ,
28+ ];
29+ }
2630
2731 public function setUp (): void
2832 {
You can’t perform that action at this time.
0 commit comments