From: Sara Golemon Date: Sat, 30 Apr 2016 06:02:01 +0000 (+0000) Subject: Create temporary sqlite db in test dir rather than cwd (and clean it up) X-Git-Tag: php-7.0.7RC1~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d0b952260e7c9794953268ccc34e1b3843b0be68;p=php Create temporary sqlite db in test dir rather than cwd (and clean it up) Well behaved tests do not leave their droppings all over the filesystem. --- diff --git a/ext/pdo_sqlite/tests/bug70221.phpt b/ext/pdo_sqlite/tests/bug70221.phpt index 1ee2378bc6..bead80d233 100644 --- a/ext/pdo_sqlite/tests/bug70221.phpt +++ b/ext/pdo_sqlite/tests/bug70221.phpt @@ -6,10 +6,13 @@ if (!extension_loaded('pdo_sqlite')) print 'skip not loaded'; ?> --FILE-- true)); +$dbfile = __DIR__ . '/test.sqlite'; +$db = new PDO('sqlite:'.$dbfile, null, null, array(PDO::ATTR_PERSISTENT => true)); function _test() { return 42; } $db->sqliteCreateFunction('test', '_test', 0); print("Everything is fine, no exceptions here\n"); +unset($db); +unlink($dbfile); ?> --EXPECT-- Everything is fine, no exceptions here