File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -45,10 +45,19 @@ protected function setUp(): void
4545 'database ' => 'database.db ' ,
4646 'DBDebug ' => true ,
4747 ];
48- $ this ->db = db_connect ($ config );
48+ $ this ->db = db_connect ($ config, false );
4949 $ this ->forge = Database::forge ($ config );
5050 }
5151
52+ protected function tearDown (): void
53+ {
54+ parent ::tearDown ();
55+
56+ if (is_file (WRITEPATH . 'database.db ' )) {
57+ unlink (WRITEPATH . 'database.db ' );
58+ }
59+ }
60+
5261 public function testGetIndexData (): void
5362 {
5463 // INTEGER PRIMARY KEY AUTO_INCREMENT doesn't get an index by default
Original file line number Diff line number Diff line change @@ -470,6 +470,10 @@ public function testMigrationUsesSameConnectionAsMigrationRunner(): void
470470 $ this ->assertCount (2 , $ tables );
471471 $ this ->assertSame ('migrations ' , $ tables [0 ]);
472472 $ this ->assertSame ('foo ' , $ tables [1 ]);
473+
474+ if (is_file ($ config ['database ' ])) {
475+ unlink ($ config ['database ' ]);
476+ }
473477 }
474478
475479 protected function resetTables ($ db = null ): void
You can’t perform that action at this time.
0 commit comments