Remove temporary DB file on teardown

parent 9be84e76
...@@ -15,7 +15,9 @@ use Exception; ...@@ -15,7 +15,9 @@ use Exception;
use PDO; use PDO;
use RuntimeException; use RuntimeException;
use Throwable; use Throwable;
use function file_exists;
use function in_array; use function in_array;
use function unlink;
class ConnectionTest extends DbalFunctionalTestCase class ConnectionTest extends DbalFunctionalTestCase
{ {
...@@ -27,6 +29,10 @@ class ConnectionTest extends DbalFunctionalTestCase ...@@ -27,6 +29,10 @@ class ConnectionTest extends DbalFunctionalTestCase
protected function tearDown() : void protected function tearDown() : void
{ {
if (file_exists('/tmp/test_nesting.sqlite')) {
unlink('/tmp/test_nesting.sqlite');
}
parent::tearDown(); parent::tearDown();
$this->resetSharedConn(); $this->resetSharedConn();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment