summaryrefslogtreecommitdiff
path: root/ext/sqlite/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ext/sqlite/tests')
-rw-r--r--ext/sqlite/tests/blankdb.inc16
-rwxr-xr-xext/sqlite/tests/blankdb_oo.inc10
-rwxr-xr-xext/sqlite/tests/bug28112.phpt2
3 files changed, 4 insertions, 24 deletions
diff --git a/ext/sqlite/tests/blankdb.inc b/ext/sqlite/tests/blankdb.inc
index 43c6ff358..5ca484117 100644
--- a/ext/sqlite/tests/blankdb.inc
+++ b/ext/sqlite/tests/blankdb.inc
@@ -1,17 +1,3 @@
<?php #vim:ft=php
-$dbname = tempnam(dirname(__FILE__), "phpsql");
-function cleanup() {
- $retry = 10;
-
- if (is_resource($GLOBALS['db'])) {
- @sqlite_close($GLOBALS['db']);
- }
- do {
- usleep(500000);
- if (@unlink($GLOBALS['dbname']))
- break;
- } while (file_exists($GLOBALS['dbname']) && --$retry);
-}
-register_shutdown_function("cleanup");
-$db = sqlite_open($dbname);
+$db = sqlite_open(":memory:");
?>
diff --git a/ext/sqlite/tests/blankdb_oo.inc b/ext/sqlite/tests/blankdb_oo.inc
index 3bbf4fd0b..1139d17c8 100755
--- a/ext/sqlite/tests/blankdb_oo.inc
+++ b/ext/sqlite/tests/blankdb_oo.inc
@@ -1,11 +1,3 @@
<?php #vim:ft=php
-$dbname = tempnam(dirname(__FILE__), "phpsql");
-function cleanup() {
- global $db, $dbname;
- $db = NULL;
- usleep(500000);
- @unlink($dbname);
-}
-register_shutdown_function("cleanup");
-$db = new SQLiteDatabase($dbname);
+$db = new SQLiteDatabase(":memory:");
?>
diff --git a/ext/sqlite/tests/bug28112.phpt b/ext/sqlite/tests/bug28112.phpt
index 62f4799d6..398180e79 100755
--- a/ext/sqlite/tests/bug28112.phpt
+++ b/ext/sqlite/tests/bug28112.phpt
@@ -1,5 +1,7 @@
--TEST--
Bug #28112 (sqlite_query() crashing apache on malformed query)
+--SKIPIF--
+<?php if (!extension_loaded("sqlite")) print "skip"; ?>
--FILE--
<?php