We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f1a9f3b commit d7c9ad2Copy full SHA for d7c9ad2
1 file changed
tests/system/Commands/CreateDatabaseTest.php
@@ -12,6 +12,7 @@
12
namespace CodeIgniter\Commands;
13
14
use CodeIgniter\Database\BaseConnection;
15
+use CodeIgniter\Database\Database as DatabaseFactory;
16
use CodeIgniter\Database\SQLite3\Connection as SQLite3Connection;
17
use CodeIgniter\Test\CIUnitTestCase;
18
use CodeIgniter\Test\Filters\CITestStreamFilter;
@@ -45,7 +46,11 @@ protected function setUp(): void
45
46
unlink($file);
47
}
48
} else {
- Database::forge()->dropDatabase('foobar');
49
+ $util = (new DatabaseFactory())->loadUtils($this->connection);
50
+
51
+ if ($util->databaseExists('foobar')) {
52
+ Database::forge()->dropDatabase('foobar');
53
+ }
54
55
56
0 commit comments