Renamed the migration file on publish & loadMigrationsFrom()

This commit is contained in:
Alex Renoki 2020-08-13 19:51:09 +03:00
parent 1227bc80d3
commit 65ae998aed
3 changed files with 3 additions and 5 deletions

View File

@ -26,7 +26,7 @@ class WebSocketsServiceProvider extends ServiceProvider
], 'config'); ], 'config');
$this->publishes([ $this->publishes([
__DIR__.'/../database/migrations/create_websockets_statistics_entries_table.php.stub' => database_path('migrations/0000_00_00_000000_create_websockets_statistics_entries_table.php'), __DIR__.'/../database/migrations/0000_00_00_000000_create_websockets_statistics_entries_table.php' => database_path('migrations/0000_00_00_000000_create_websockets_statistics_entries_table.php'),
], 'migrations'); ], 'migrations');
$this $this

View File

@ -34,6 +34,8 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase
$this->channelManager, $this->channelManager,
Mockery::mock(Browser::class) Mockery::mock(Browser::class)
)); ));
$this->loadMigrationsFrom(__DIR__.'/../database/migrations');
} }
protected function getPackageProviders($app) protected function getPackageProviders($app)
@ -54,10 +56,6 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase
'enable_statistics' => true, 'enable_statistics' => true,
], ],
]); ]);
include_once __DIR__.'/../database/migrations/create_websockets_statistics_entries_table.php.stub';
(new \CreateWebSocketsStatisticsEntriesTable())->up();
} }
protected function getWebSocketConnection(string $url = '/?appKey=TestKey'): Connection protected function getWebSocketConnection(string $url = '/?appKey=TestKey'): Connection