File tree Expand file tree Collapse file tree 2 files changed +8
-24
lines changed
Expand file tree Collapse file tree 2 files changed +8
-24
lines changed Original file line number Diff line number Diff line change @@ -33,12 +33,7 @@ public function testCreateMigration()
3333
3434 app (MigrationGenerator::class)
3535 ->setModel ('Post ' )
36- ->setRelations ([
37- 'belongsTo ' => [],
38- 'belongsToMany ' => [],
39- 'hasOne ' => [],
40- 'hasMany ' => [],
41- ])
36+ ->setRelations (new RelationsDTO ())
4237 ->setFields ([
4338 'integer-required ' => ['media_id ' , 'user_id ' ],
4439 'string ' => ['title ' , 'body ' ],
@@ -58,12 +53,7 @@ public function testCreateMigrationMYSQL()
5853
5954 app (MigrationGenerator::class)
6055 ->setModel ('Post ' )
61- ->setRelations ([
62- 'belongsTo ' => [],
63- 'belongsToMany ' => [],
64- 'hasOne ' => [],
65- 'hasMany ' => [],
66- ])
56+ ->setRelations (new RelationsDTO ())
6757 ->setFields ([
6858 'integer-required ' => ['media_id ' , 'user_id ' ],
6959 'string ' => ['title ' , 'body ' ],
@@ -84,12 +74,7 @@ public function testCreateMigrationWithoutMigrationStub(): void
8474
8575 app (MigrationGenerator::class)
8676 ->setModel ('Post ' )
87- ->setRelations ([
88- 'belongsTo ' => [],
89- 'belongsToMany ' => [],
90- 'hasOne ' => [],
91- 'hasMany ' => [],
92- ])
77+ ->setRelations (new RelationsDTO ())
9378 ->setFields ([
9479 'integer-required ' => ['media_id ' , 'user_id ' ],
9580 'string ' => ['title ' , 'body ' ],
Original file line number Diff line number Diff line change @@ -91,12 +91,11 @@ public function testCreateWithoutTrait()
9191 ]);
9292
9393 app (ServiceGenerator::class)
94- ->setRelations ([
95- 'hasOne ' => [],
96- 'belongsTo ' => ['User ' ],
97- 'hasMany ' => ['Comment ' ],
98- 'belongsToMany ' => []
99- ])
94+ ->setRelations (
95+ new RelationsDTO (
96+ hasMany: ['Comment ' ],
97+ belongsTo: ['User ' ],
98+ ))
10099 ->setFields ([
101100 'integer-required ' => ['media_id ' ],
102101 'string-required ' => ['body ' ],
You can’t perform that action at this time.
0 commit comments