summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/sqlite/tests/blankdb.inc9
-rwxr-xr-xext/sqlite/tests/sqlite_oo_029.phpt8
2 files changed, 11 insertions, 6 deletions
diff --git a/ext/sqlite/tests/blankdb.inc b/ext/sqlite/tests/blankdb.inc
index 1937c515ed..43c6ff3582 100644
--- a/ext/sqlite/tests/blankdb.inc
+++ b/ext/sqlite/tests/blankdb.inc
@@ -1,11 +1,16 @@
<?php #vim:ft=php
$dbname = tempnam(dirname(__FILE__), "phpsql");
function cleanup() {
+ $retry = 10;
+
if (is_resource($GLOBALS['db'])) {
@sqlite_close($GLOBALS['db']);
- usleep(500000);
}
- unlink($GLOBALS['dbname']);
+ do {
+ usleep(500000);
+ if (@unlink($GLOBALS['dbname']))
+ break;
+ } while (file_exists($GLOBALS['dbname']) && --$retry);
}
register_shutdown_function("cleanup");
$db = sqlite_open($dbname);
diff --git a/ext/sqlite/tests/sqlite_oo_029.phpt b/ext/sqlite/tests/sqlite_oo_029.phpt
index f6babeb5b8..23a819295a 100755
--- a/ext/sqlite/tests/sqlite_oo_029.phpt
+++ b/ext/sqlite/tests/sqlite_oo_029.phpt
@@ -1,7 +1,7 @@
--TEST--
sqlite-oo: call method with $this
--FILE--
-<?php
+<?php
include "blankdb_oo.inc";
$db->query("CREATE TABLE strings(key VARCHAR(10), var VARCHAR(10))");
@@ -29,7 +29,7 @@ class sqlite_help
{
unset($this->db);
}
-
+
function __destruct()
{
echo "DESTRUCTED\n";
@@ -37,7 +37,7 @@ class sqlite_help
}
$obj = new sqlite_help($db);
-echo $obj->get_single('foo')."\n";;
+echo $obj->get_single('foo')."\n";
$obj->free();
unset($obj);
@@ -46,4 +46,4 @@ unset($obj);
--EXPECT--
bar
===DONE===
-DESTRUCTED \ No newline at end of file
+DESTRUCTED