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
134
134
135
135
// Under GitHub Actions, we can set an ENV var named 'DB'
136
136
// 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 ] ?? [];
140
140
141
141
return $ config ;
142
142
}
Original file line number Diff line number Diff line change @@ -32,11 +32,11 @@ final class MigrateStatusTest extends CIUnitTestCase
32
32
33
33
protected function setUp (): void
34
34
{
35
- $ forge = Database::forge ();
36
- $ forge ->dropTable ('foo ' , true );
37
-
38
35
parent ::setUp ();
39
36
37
+ Database::connect ()->table ('migrations ' )->emptyTable ();
38
+ Database::forge ()->dropTable ('foo ' , true );
39
+
40
40
if (! is_file ($ this ->migrationFileFrom )) {
41
41
$ this ->fail (clean_path ($ this ->migrationFileFrom ) . ' is not found. ' );
42
42
}
@@ -63,8 +63,7 @@ protected function tearDown(): void
63
63
{
64
64
parent ::tearDown ();
65
65
66
- $ db = db_connect ();
67
- $ db ->table ('migrations ' )->emptyTable ();
66
+ Database::connect ()->table ('migrations ' )->emptyTable ();
68
67
69
68
if (is_file ($ this ->migrationFileTo )) {
70
69
@unlink ($ this ->migrationFileTo );
You can’t perform that action at this time.
0 commit comments