@@ -14,7 +14,7 @@ class ModelInfoExtractorTest extends DatabaseTestCase
14
14
{
15
15
protected function afterRefreshingDatabase ()
16
16
{
17
- Schema::create ('parent_test_model ' , function (Blueprint $ table ) {
17
+ Schema::create ('parent_test_models ' , function (Blueprint $ table ) {
18
18
$ table ->id ();
19
19
});
20
20
Schema::create ('model_info_extractor_test_model ' , function (Blueprint $ table ) {
@@ -34,7 +34,7 @@ public function test_extracts_model_data()
34
34
$ modelInfo = $ extractor ->handle (ModelInfoExtractorTestModel::class);
35
35
36
36
$ this ->assertEquals (ModelInfoExtractorTestModel::class, $ modelInfo ['class ' ]);
37
- $ this ->assertEquals (' testing ' , $ modelInfo ['database ' ]);
37
+ $ this ->assertEquals (Schema:: getConnection ()-> getConfig ()[ ' name ' ] , $ modelInfo ['database ' ]);
38
38
$ this ->assertEquals ('model_info_extractor_test_model ' , $ modelInfo ['table ' ]);
39
39
$ this ->assertNull ($ modelInfo ['policy ' ]);
40
40
$ this ->assertCount (8 , $ modelInfo ['attributes ' ]);
@@ -92,7 +92,7 @@ public function test_extracts_model_data()
92
92
], $ modelInfo ['attributes ' ][3 ]);
93
93
94
94
$ this ->assertEqualsCanonicalizing ([
95
- 'name ' => 'parent_model_id ' ,
95
+ 'name ' => 'parent_test_model_id ' ,
96
96
'type ' => 'integer ' ,
97
97
'increments ' => false ,
98
98
'nullable ' => false ,
@@ -175,7 +175,7 @@ public function parentModel(): BelongsTo
175
175
176
176
class ParentTestModel extends Model
177
177
{
178
- public $ table = 'parent_test_model ' ;
178
+ public $ table = 'parent_test_models ' ;
179
179
public $ timestamps = false ;
180
180
}
181
181
0 commit comments