88use RonasIT \Support \Exceptions \ClassNotExistsException ;
99use RonasIT \Support \Generators \ModelGenerator ;
1010use RonasIT \Support \Tests \Support \Model \ModelMockTrait ;
11- use RonasIT \Support \Traits \MockTrait ;
1211
1312class ModelGeneratorTest extends TestCase
1413{
15- use ModelMockTrait, MockTrait ;
14+ use ModelMockTrait;
1615
1716 public function testModelAlreadyExists ()
1817 {
@@ -69,7 +68,7 @@ public function testCreateModel()
6968
7069 $ this ->assertGeneratedFileEquals ('new_model.php ' , 'app/Models/Post.php ' );
7170 $ this ->assertGeneratedFileEquals ('comment_relation_model.php ' , 'app/Models/Comment.php ' );
72- $ this ->assertGeneratedFileEquals ('user_relation_model .php ' , 'app/Models/User.php ' );
71+ $ this ->assertGeneratedFileEquals ('comment_relation_model .php ' , 'app/Models/User.php ' );
7372
7473 $ this ->assertEventPushed (
7574 className: SuccessCreateMessage::class,
@@ -86,12 +85,6 @@ public function testCreateModelStubNotExist()
8685 app (ModelGenerator::class)
8786 ->setModel ('Post ' )
8887 ->setFields ([])
89- ->setRelations ([
90- 'hasOne ' => [],
91- 'hasMany ' => [],
92- 'belongsTo ' => [],
93- 'belongsToMany ' => [],
94- ])
9588 ->generate ();
9689
9790 $ this ->assertFileDoesNotExist ('app/Models/Post.php ' );
@@ -113,12 +106,6 @@ public function testCreateModelWithoutRelationsRelationStubNotExist()
113106 app (ModelGenerator::class)
114107 ->setModel ('Post ' )
115108 ->setFields ([])
116- ->setRelations ([
117- 'hasOne ' => [],
118- 'hasMany ' => [],
119- 'belongsTo ' => [],
120- 'belongsToMany ' => [],
121- ])
122109 ->generate ();
123110
124111 $ this ->assertGeneratedFileEquals ('new_model_without_fields_and_relations.php ' , 'app/Models/Post.php ' );
0 commit comments