mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Merge pull request #8393 from paulbalandan/leftover-db-files
test: ensure cleanup of sqlite3 db files after test
This commit is contained in:
commit
985ac9f039
@ -32,7 +32,7 @@ final class GetFieldDataTest extends AbstractGetFieldDataTest
|
||||
'database' => 'database.db',
|
||||
'DBDebug' => true,
|
||||
];
|
||||
$this->db = db_connect($config);
|
||||
$this->db = db_connect($config, false);
|
||||
$this->forge = Database::forge($config);
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ final class GetIndexDataTest extends CIUnitTestCase
|
||||
'database' => 'database.db',
|
||||
'DBDebug' => true,
|
||||
];
|
||||
$this->db = db_connect($config);
|
||||
$this->db = db_connect($config, false);
|
||||
$this->forge = Database::forge($config);
|
||||
}
|
||||
|
||||
|
@ -470,6 +470,10 @@ final class MigrationRunnerTest extends CIUnitTestCase
|
||||
$this->assertCount(2, $tables);
|
||||
$this->assertSame('migrations', $tables[0]);
|
||||
$this->assertSame('foo', $tables[1]);
|
||||
|
||||
if (is_file($config['database'])) {
|
||||
unlink($config['database']);
|
||||
}
|
||||
}
|
||||
|
||||
protected function resetTables($db = null): void
|
||||
|
Loading…
x
Reference in New Issue
Block a user