com php-src: Improve cleanup: ext/pdo_sqlite/tests/bug70 221.phpt
| From: | Anatol Belski | Date: | Fri, 03 Aug 2018 05:08:53 +0000 |
| Subject: | com php-src: Improve cleanup: ext/pdo_sqlite/tests/bug70 221.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-102792@lists.php.net to get a copy of this message | ||
Commit: 41c69766a4bcbd74779379129964cf0bf26b4217
Author: Anatol Belski <ab@php.net> Fri, 3 Aug 2018 07:08:53 +0200
Parents: 19592519c2803a42762e8fee18505083dc3474fc
Branches: PHP-7.1 PHP-7.2 PHP-7.3 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=41c69766a4bcbd74779379129964cf0bf26b4217
Log:
Improve cleanup
The persistent connection locks the file which might prevent deletion.
Changed paths:
M ext/pdo_sqlite/tests/bug70221.phpt
Diff:
diff --git a/ext/pdo_sqlite/tests/bug70221.phpt b/ext/pdo_sqlite/tests/bug70221.phpt
index 2d1aea0..aa9d4ee 100644
--- a/ext/pdo_sqlite/tests/bug70221.phpt
+++ b/ext/pdo_sqlite/tests/bug70221.phpt
@@ -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