]> granicus.if.org Git - php/commitdiff
Improve cleanup
authorAnatol Belski <ab@php.net>
Fri, 3 Aug 2018 05:08:53 +0000 (07:08 +0200)
committerAnatol Belski <ab@php.net>
Fri, 3 Aug 2018 05:08:53 +0000 (07:08 +0200)
The persistent connection locks the file which might prevent deletion.

ext/pdo_sqlite/tests/bug70221.phpt

index 2d1aea0e8b5274289f138a960fe682870f1c2c96..aa9d4ee8e21c9f0e044bf91930bbb9e4ad243c13 100644 (file)
@@ -12,7 +12,11 @@ function _test() { return 42; }
 $db->sqliteCreateFunction('test', '_test', 0);
 print("Everything is fine, no exceptions here\n");
 unset($db);
-@unlink($dbfile);
+?>
+--CLEAN--
+<?php
+$dbfile = __DIR__ . '/test.sqlite';
+unlink($dbfile);
 ?>
 --EXPECT--
 Everything is fine, no exceptions here