File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 1919 ->expect ('test.sql ' )
2020 ->fileOnDiskToPassRegex ('/CREATE TABLE(?: IF NOT EXISTS){0,1} "models"/ ' );
2121
22+ it ('can will prepend the connection to the default name if no specific name is passed ' , function () {
23+
24+ config ()->set ('database.connections.second_connection ' , [
25+ 'driver ' => 'sqlite ' ,
26+ 'database ' => __DIR__ . '/../temp/second_connection.sqlite ' ,
27+ 'prefix ' => '' ,
28+ ]);
29+
30+ Artisan::call ('snapshot:create ' , ['--connection ' => 'second_connection ' ]);
31+ $ fileName = 'second_connection_ ' . Carbon::now ()->format ('Y-m-d_H-i-s ' ) . '.sql ' ;
32+
33+ $ this ->disk ->assertExists ($ fileName );
34+ });
35+
2236it ('can create a compressed snapshot from CLI param ' , function () {
2337 Artisan::call ('snapshot:create ' , ['--compress ' => true ]);
2438
You can’t perform that action at this time.
0 commit comments