Skip to content

Commit 8f19e76

Browse files
committed
Fix test
1 parent dc4dad2 commit 8f19e76

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/MigrationWriterTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
namespace KitLoong\MigrationsGenerator\Tests;
44

5+
use Illuminate\Support\Facades\DB;
56
use KitLoong\MigrationsGenerator\Enum\Migrations\Method\SchemaBuilder;
67
use KitLoong\MigrationsGenerator\Migration\Blueprint\SchemaBlueprint;
78
use KitLoong\MigrationsGenerator\Migration\Blueprint\TableBlueprint;
89
use KitLoong\MigrationsGenerator\Migration\Enum\MigrationFileType;
910
use KitLoong\MigrationsGenerator\Migration\Writer\MigrationWriter;
11+
use KitLoong\MigrationsGenerator\Setting;
1012
use KitLoong\MigrationsGenerator\Support\TableName;
1113
use Mockery\MockInterface;
1214

@@ -17,6 +19,9 @@ class MigrationWriterTest extends TestCase
1719
*/
1820
public function testWrite()
1921
{
22+
$setting = app(Setting::class);
23+
$setting->setDefaultConnection(DB::getDefaultConnection());
24+
2025
$this->mock(TableName::class, function (MockInterface $mock) {
2126
$mock->shouldReceive('stripPrefix')
2227
->andReturn('test');

0 commit comments

Comments
 (0)