8000 fix table · laravel/framework@b9d3ec2 · GitHub
[go: up one dir, main page]

Skip to content

Commit b9d3ec2

Browse files
committed
fix table
1 parent 000123c commit b9d3ec2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/Integration/Database/ModelInfoExtractorTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class ModelInfoExtractorTest extends DatabaseTestCase
1414
{
1515
protected function afterRefreshingDatabase()
1616
{
17-
Schema::create('parent_test_model', function (Blueprint $table) {
17+
Schema::create('parent_test_models', function (Blueprint $table) {
1818
$table->id();
1919
});
2020
Schema::create('model_info_extractor_test_model', function (Blueprint $table) {
@@ -34,7 +34,7 @@ public function test_extracts_model_data()
3434
$modelInfo = $extractor->handle(ModelInfoExtractorTestModel::class);
3535

3636
$this->assertEquals(ModelInfoExtractorTestModel::class, $modelInfo['class']);
37-
$this->assertEquals('testing', $modelInfo['database']);
37+
$this->assertEquals(Schema::getConnection()->getConfig()['name'], $modelInfo['database']);
3838
$this->assertEquals('model_info_extractor_test_model', $modelInfo['table']);
3939
$this->assertNull($modelInfo['policy']);
4040
$this->assertCount(8, $modelInfo['attributes']);
@@ -92,7 +92,7 @@ public function test_extracts_model_data()
9292
], $modelInfo['attributes'][3]);
9393

9494
$this->assertEqualsCanonicalizing([
95-
'name' => 'parent_model_id',
95+
'name' => 'parent_test_model_id',
9696
'type' => 'integer',
9797
'increments' => false,
9898
'nullable' => false,
@@ -175,7 +175,7 @@ public function parentModel(): BelongsTo
175175

176176
class ParentTestModel extends Model
177177
{
178-
public $table = 'parent_test_model';
178+
public $table = 'parent_test_models';
179179
public $timestamps = false;
180180
}
181181

0 commit comments

Comments
 (0)
0