File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -134,9 +134,9 @@ public static function Database(): array
134134
135135 // Under GitHub Actions, we can set an ENV var named 'DB'
136136 // so that we can test against multiple databases.
137- if (( $ group = getenv ('DB ' )) && isset ( self :: $ dbConfig [ $ group ])) {
138- $ config [ ' tests ' ] = self :: $ dbConfig [ $ group ];
139- }
137+ $ group = env ('DB ' , ' SQLite3 ' );
138+
139+ $ config [ ' tests ' ] = self :: $ dbConfig [ $ group ] ?? [];
140140
141141 return $ config ;
142142 }
Original file line number Diff line number Diff line change @@ -32,11 +32,11 @@ final class MigrateStatusTest extends CIUnitTestCase
3232
3333 protected function setUp (): void
3434 {
35- $ forge = Database::forge ();
36- $ forge ->dropTable ('foo ' , true );
37-
3835 parent ::setUp ();
3936
37+ Database::connect ()->table ('migrations ' )->emptyTable ();
38+ Database::forge ()->dropTable ('foo ' , true );
39+
4040 if (! is_file ($ this ->migrationFileFrom )) {
4141 $ this ->fail (clean_path ($ this ->migrationFileFrom ) . ' is not found. ' );
4242 }
@@ -63,8 +63,7 @@ protected function tearDown(): void
6363 {
6464 parent ::tearDown ();
6565
66- $ db = db_connect ();
67- $ db ->table ('migrations ' )->emptyTable ();
66+ Database::connect ()->table ('migrations ' )->emptyTable ();
6867
6968 if (is_file ($ this ->migrationFileTo )) {
7069 @unlink ($ this ->migrationFileTo );
You can’t perform that action at this time.
0 commit comments