diff options
| author | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:35:13 -0400 |
|---|---|---|
| committer | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:35:13 -0400 |
| commit | 0a36161e13484a99ccf69bb38f206462d27cc6d6 (patch) | |
| tree | d5107db4b7369603ac7c753829e8972ee74949f7 /ext/sqlite/tests | |
| parent | ce7edc9b3c7370f32fec0bc7a8ec3e29ed9a5f61 (diff) | |
| download | php-upstream/5.1.2.tar.gz | |
Imported Upstream version 5.1.2upstream/5.1.2
Diffstat (limited to 'ext/sqlite/tests')
| -rw-r--r-- | ext/sqlite/tests/blankdb.inc | 16 | ||||
| -rwxr-xr-x | ext/sqlite/tests/blankdb_oo.inc | 10 | ||||
| -rwxr-xr-x | ext/sqlite/tests/bug28112.phpt | 2 |
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
|
