Skip to content

Commit b325828

Browse files
committed
fix: tests
1 parent 0b7c31e commit b325828

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/Generators/EntityGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ abstract class EntityGenerator
3737
protected $paths = [];
3838
protected $model;
3939
protected $fields;
40-
protected RelationsDTO $relations;
40+
protected $relations = [];
4141
protected $crudOptions;
4242

4343
/**

tests/FactoryGeneratorTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,10 @@ public function testConfigFolderWithExtension(): void
160160
'string' => ['title', 'iban', 'something'],
161161
'json' => ['json_text'],
162162
])
163-
->setRelations([
164-
'hasOne' => ['user'],
165-
'hasMany' => [],
166-
'belongsTo' => ['user'],
167-
])
163+
->setRelations(new RelationsDTO(
164+
hasOne: ['user'],
165+
belongsTo: ['user'],
166+
))
168167
->setModel('Post')
169168
->generate();
170169

0 commit comments

Comments
 (0)