summaryrefslogtreecommitdiff
path: root/ext/sqlite/tests
diff options
context:
space:
mode:
authorJohannes Schlüter <johannes@php.net>2010-11-19 09:55:48 +0000
committerJohannes Schlüter <johannes@php.net>2010-11-19 09:55:48 +0000
commit6c76f3606cddeb010cf1fc5ea28b47456ea9639e (patch)
tree73c1b306cd449f571f2b28793cfac1de673b7fad /ext/sqlite/tests
parent4cc45507da8164847708c26bfdf0840419a166fc (diff)
downloadphp-git-6c76f3606cddeb010cf1fc5ea28b47456ea9639e.tar.gz
- Move the old sqlite extension to PECL
# discussed in http://www.mail-archive.com/internals@lists.php.net/msg47463.html
Diffstat (limited to 'ext/sqlite/tests')
-rw-r--r--ext/sqlite/tests/blankdb.inc3
-rwxr-xr-xext/sqlite/tests/blankdb_oo.inc3
-rw-r--r--ext/sqlite/tests/bug26911.phpt12
-rwxr-xr-xext/sqlite/tests/bug28112.phpt16
-rw-r--r--ext/sqlite/tests/bug35248.phpt15
-rw-r--r--ext/sqlite/tests/bug38759.phpt18
-rw-r--r--ext/sqlite/tests/bug48679.phpt20
-rw-r--r--ext/sqlite/tests/pdo/common.phpt12
-rwxr-xr-xext/sqlite/tests/sqlite_001.phpt16
-rwxr-xr-xext/sqlite/tests/sqlite_002.phpt32
-rwxr-xr-xext/sqlite/tests/sqlite_003.phpt52
-rw-r--r--ext/sqlite/tests/sqlite_004.phpt49
-rw-r--r--ext/sqlite/tests/sqlite_005.phpt50
-rw-r--r--ext/sqlite/tests/sqlite_006.phpt55
-rwxr-xr-xext/sqlite/tests/sqlite_007.phpt52
-rwxr-xr-xext/sqlite/tests/sqlite_008.phpt46
-rwxr-xr-xext/sqlite/tests/sqlite_009.phpt46
-rwxr-xr-xext/sqlite/tests/sqlite_010.phpt81
-rwxr-xr-xext/sqlite/tests/sqlite_011.phpt34
-rwxr-xr-xext/sqlite/tests/sqlite_012.phpt38
-rwxr-xr-xext/sqlite/tests/sqlite_013.phpt78
-rwxr-xr-xext/sqlite/tests/sqlite_014.phpt120
-rwxr-xr-xext/sqlite/tests/sqlite_015.phpt49
-rwxr-xr-xext/sqlite/tests/sqlite_016.phpt45
-rwxr-xr-xext/sqlite/tests/sqlite_017.phpt33
-rwxr-xr-xext/sqlite/tests/sqlite_018.phpt14
-rwxr-xr-xext/sqlite/tests/sqlite_019.phpt47
-rwxr-xr-xext/sqlite/tests/sqlite_022.phpt101
-rw-r--r--ext/sqlite/tests/sqlite_023.phpt105
-rwxr-xr-xext/sqlite/tests/sqlite_024.phpt76
-rwxr-xr-xext/sqlite/tests/sqlite_025.phpt38
-rwxr-xr-xext/sqlite/tests/sqlite_026.phpt27
-rwxr-xr-xext/sqlite/tests/sqlite_027.phpt15
-rwxr-xr-xext/sqlite/tests/sqlite_closures_001.phpt54
-rwxr-xr-xext/sqlite/tests/sqlite_closures_002.phpt52
-rw-r--r--ext/sqlite/tests/sqlite_exec_basic.phpt34
-rw-r--r--ext/sqlite/tests/sqlite_exec_error.phpt44
-rw-r--r--ext/sqlite/tests/sqlite_last_error_basic.phpt48
-rw-r--r--ext/sqlite/tests/sqlite_last_error_error.phpt47
-rwxr-xr-xext/sqlite/tests/sqlite_oo_001.phpt17
-rwxr-xr-xext/sqlite/tests/sqlite_oo_002.phpt41
-rwxr-xr-xext/sqlite/tests/sqlite_oo_003.phpt51
-rwxr-xr-xext/sqlite/tests/sqlite_oo_008.phpt43
-rwxr-xr-xext/sqlite/tests/sqlite_oo_009.phpt43
-rwxr-xr-xext/sqlite/tests/sqlite_oo_010.phpt44
-rwxr-xr-xext/sqlite/tests/sqlite_oo_011.phpt33
-rwxr-xr-xext/sqlite/tests/sqlite_oo_012.phpt35
-rwxr-xr-xext/sqlite/tests/sqlite_oo_013.phpt75
-rwxr-xr-xext/sqlite/tests/sqlite_oo_014.phpt118
-rwxr-xr-xext/sqlite/tests/sqlite_oo_015.phpt47
-rwxr-xr-xext/sqlite/tests/sqlite_oo_016.phpt42
-rwxr-xr-xext/sqlite/tests/sqlite_oo_020.phpt66
-rwxr-xr-xext/sqlite/tests/sqlite_oo_021.phpt48
-rwxr-xr-xext/sqlite/tests/sqlite_oo_022.phpt98
-rwxr-xr-xext/sqlite/tests/sqlite_oo_024.phpt74
-rwxr-xr-xext/sqlite/tests/sqlite_oo_025.phpt103
-rwxr-xr-xext/sqlite/tests/sqlite_oo_026.phpt56
-rwxr-xr-xext/sqlite/tests/sqlite_oo_027.phpt42
-rwxr-xr-xext/sqlite/tests/sqlite_oo_028.phpt25
-rwxr-xr-xext/sqlite/tests/sqlite_oo_029.phpt53
-rwxr-xr-xext/sqlite/tests/sqlite_oo_030.phpt44
-rw-r--r--ext/sqlite/tests/sqlite_popen_basic.phpt27
-rw-r--r--ext/sqlite/tests/sqlite_popen_error.phpt34
-rw-r--r--ext/sqlite/tests/sqlite_session_001.phpt46
-rw-r--r--ext/sqlite/tests/sqlite_session_002.phpt54
-rwxr-xr-xext/sqlite/tests/sqlite_spl_001.phpt125
-rwxr-xr-xext/sqlite/tests/sqlite_spl_002.phpt29
-rwxr-xr-xext/sqlite/tests/sqlite_spl_003.phpt28
-rw-r--r--ext/sqlite/tests/sqlitedatabase_arrayquery.phpt23
69 files changed, 0 insertions, 3241 deletions
diff --git a/ext/sqlite/tests/blankdb.inc b/ext/sqlite/tests/blankdb.inc
deleted file mode 100644
index 5ca4841176..0000000000
--- a/ext/sqlite/tests/blankdb.inc
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php #vim:ft=php
-$db = sqlite_open(":memory:");
-?>
diff --git a/ext/sqlite/tests/blankdb_oo.inc b/ext/sqlite/tests/blankdb_oo.inc
deleted file mode 100755
index 1139d17c8b..0000000000
--- a/ext/sqlite/tests/blankdb_oo.inc
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php #vim:ft=php
-$db = new SQLiteDatabase(":memory:");
-?>
diff --git a/ext/sqlite/tests/bug26911.phpt b/ext/sqlite/tests/bug26911.phpt
deleted file mode 100644
index 74c2167722..0000000000
--- a/ext/sqlite/tests/bug26911.phpt
+++ /dev/null
@@ -1,12 +0,0 @@
---TEST--
-Bug #26911 (crash when fetching data from empty queries)
---SKIPIF--
-<?php if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
- $db = sqlite_open(":memory:");
- $a = sqlite_query($db, " ");
- echo "I am ok\n";
-?>
---EXPECT--
-I am ok
diff --git a/ext/sqlite/tests/bug28112.phpt b/ext/sqlite/tests/bug28112.phpt
deleted file mode 100755
index f3e9b8b9ec..0000000000
--- a/ext/sqlite/tests/bug28112.phpt
+++ /dev/null
@@ -1,16 +0,0 @@
---TEST--
-Bug #28112 (sqlite_query() crashing apache on malformed query)
---SKIPIF--
-<?php if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-
-if (!($db = sqlite_open(":memory:", 666, $error))) die ("Couldn't open the database");
-sqlite_query($db, "create table frob (foo INTEGER PRIMARY KEY, bar text);");
-$res = @sqlite_array_query($db, "");
-
-?>
-===DONE===
-<?php exit(0); ?>
---EXPECTF--
-===DONE===
diff --git a/ext/sqlite/tests/bug35248.phpt b/ext/sqlite/tests/bug35248.phpt
deleted file mode 100644
index 4898a4142e..0000000000
--- a/ext/sqlite/tests/bug35248.phpt
+++ /dev/null
@@ -1,15 +0,0 @@
---TEST--
-Bug #35248 (sqlite_query does not return parse error message)
---SKIPIF--
-<?php if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
- $db = sqlite_open(":memory:");
- $res = @sqlite_query($db, "asdfesdfa", SQLITE_NUM, $err);
- var_dump($err);
- $res = @sqlite_unbuffered_query($db, "asdfesdfa", SQLITE_NUM, $err);
- var_dump($err);
-?>
---EXPECT--
-string(30) "near "asdfesdfa": syntax error"
-string(30) "near "asdfesdfa": syntax error"
diff --git a/ext/sqlite/tests/bug38759.phpt b/ext/sqlite/tests/bug38759.phpt
deleted file mode 100644
index ae5959d4bd..0000000000
--- a/ext/sqlite/tests/bug38759.phpt
+++ /dev/null
@@ -1,18 +0,0 @@
---TEST--
-Bug #38759 (sqlite2 empty query causes segfault)
---SKIPIF--
-<?php
-if (!extension_loaded("pdo")) print "skip";
-if (!extension_loaded("sqlite")) print "skip";
-?>
---FILE--
-<?php
-
-$dbh = new PDO('sqlite2::memory:');
-var_dump($dbh->query(" "));
-
-echo "Done\n";
-?>
---EXPECTF--
-bool(false)
-Done
diff --git a/ext/sqlite/tests/bug48679.phpt b/ext/sqlite/tests/bug48679.phpt
deleted file mode 100644
index 4b0c3f45cf..0000000000
--- a/ext/sqlite/tests/bug48679.phpt
+++ /dev/null
@@ -1,20 +0,0 @@
---TEST--
-Bug #48679 (sqlite2 count on unbuffered query causes segfault)
---SKIPIF--
-<?php
-if (!extension_loaded("sqlite")) print "skip";
-?>
---FILE--
-<?php
-
-try {
- $x = new sqliteunbuffered;
- count($x);
-} catch (SQLiteException $e) {
- var_dump($e->getMessage());
-}
-echo "Done\n";
-?>
---EXPECT--
-string(41) "Row count is not available for this query"
-Done
diff --git a/ext/sqlite/tests/pdo/common.phpt b/ext/sqlite/tests/pdo/common.phpt
deleted file mode 100644
index 42e736ae93..0000000000
--- a/ext/sqlite/tests/pdo/common.phpt
+++ /dev/null
@@ -1,12 +0,0 @@
---TEST--
-SQLite2
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded('pdo') || !extension_loaded('sqlite')) print 'skip'; ?>
---REDIRECTTEST--
-return array(
- 'ENV' => array(
- 'PDOTEST_DSN' => 'sqlite2::memory:'
- ),
- 'TESTS' => 'ext/pdo/tests'
- );
diff --git a/ext/sqlite/tests/sqlite_001.phpt b/ext/sqlite/tests/sqlite_001.phpt
deleted file mode 100755
index 61d8896570..0000000000
--- a/ext/sqlite/tests/sqlite_001.phpt
+++ /dev/null
@@ -1,16 +0,0 @@
---TEST--
-sqlite: sqlite_open/close
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-require_once('blankdb.inc');
-echo "$db\n";
-sqlite_close($db);
-echo "Done\n";
-?>
---EXPECTF--
-Resource id #%d
-Done
diff --git a/ext/sqlite/tests/sqlite_002.phpt b/ext/sqlite/tests/sqlite_002.phpt
deleted file mode 100755
index c9fd0e1bca..0000000000
--- a/ext/sqlite/tests/sqlite_002.phpt
+++ /dev/null
@@ -1,32 +0,0 @@
---TEST--
-sqlite: Simple insert/select
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-sqlite_query("CREATE TABLE foo(c1 date, c2 time, c3 varchar(64))", $db);
-sqlite_query("INSERT INTO foo VALUES ('2002-01-02', '12:49:00', NULL)", $db);
-$r = sqlite_query("SELECT * from foo", $db);
-var_dump(sqlite_fetch_array($r));
-sqlite_close($db);
-?>
---EXPECT--
-array(6) {
- [0]=>
- string(10) "2002-01-02"
- ["c1"]=>
- string(10) "2002-01-02"
- [1]=>
- string(8) "12:49:00"
- ["c2"]=>
- string(8) "12:49:00"
- [2]=>
- NULL
- ["c3"]=>
- NULL
-}
diff --git a/ext/sqlite/tests/sqlite_003.phpt b/ext/sqlite/tests/sqlite_003.phpt
deleted file mode 100755
index adb891b726..0000000000
--- a/ext/sqlite/tests/sqlite_003.phpt
+++ /dev/null
@@ -1,52 +0,0 @@
---TEST--
-sqlite: Simple insert/select, different result represenatation
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-sqlite_query("CREATE TABLE foo(c1 date, c2 time, c3 varchar(64))", $db);
-sqlite_query("INSERT INTO foo VALUES ('2002-01-02', '12:49:00', NULL)", $db);
-$r = sqlite_query("SELECT * from foo", $db);
-var_dump(sqlite_fetch_array($r, SQLITE_BOTH));
-$r = sqlite_query("SELECT * from foo", $db);
-var_dump(sqlite_fetch_array($r, SQLITE_NUM));
-$r = sqlite_query("SELECT * from foo", $db);
-var_dump(sqlite_fetch_array($r, SQLITE_ASSOC));
-sqlite_close($db);
-?>
---EXPECT--
-array(6) {
- [0]=>
- string(10) "2002-01-02"
- ["c1"]=>
- string(10) "2002-01-02"
- [1]=>
- string(8) "12:49:00"
- ["c2"]=>
- string(8) "12:49:00"
- [2]=>
- NULL
- ["c3"]=>
- NULL
-}
-array(3) {
- [0]=>
- string(10) "2002-01-02"
- [1]=>
- string(8) "12:49:00"
- [2]=>
- NULL
-}
-array(3) {
- ["c1"]=>
- string(10) "2002-01-02"
- ["c2"]=>
- string(8) "12:49:00"
- ["c3"]=>
- NULL
-}
diff --git a/ext/sqlite/tests/sqlite_004.phpt b/ext/sqlite/tests/sqlite_004.phpt
deleted file mode 100644
index 4010066578..0000000000
--- a/ext/sqlite/tests/sqlite_004.phpt
+++ /dev/null
@@ -1,49 +0,0 @@
---TEST--
-sqlite: binary encoding
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-$strings = array(
- "hello",
- "hello\x01o",
- "\x01hello there",
- "hello\x00there",
- ""
-);
-
-sqlite_query("CREATE TABLE strings(a)", $db);
-
-foreach ($strings as $str) {
- sqlite_query("INSERT INTO strings VALUES('" . sqlite_escape_string($str) . "')", $db);
-}
-
-$i = 0;
-$r = sqlite_query("SELECT * from strings", $db);
-while ($row = sqlite_fetch_array($r, SQLITE_NUM)) {
- if ($row[0] !== $strings[$i]) {
- echo "FAIL!\n";
- var_dump($row[0]);
- var_dump($strings[$i]);
- } else {
- echo "OK!\n";
- }
- $i++;
-}
-
-sqlite_close($db);
-
-echo "DONE!\n";
-?>
---EXPECT--
-OK!
-OK!
-OK!
-OK!
-OK!
-DONE!
diff --git a/ext/sqlite/tests/sqlite_005.phpt b/ext/sqlite/tests/sqlite_005.phpt
deleted file mode 100644
index e0eeab5589..0000000000
--- a/ext/sqlite/tests/sqlite_005.phpt
+++ /dev/null
@@ -1,50 +0,0 @@
---TEST--
-sqlite: aggregate functions
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-$data = array(
- "one",
- "two",
- "three"
- );
-
-sqlite_query("CREATE TABLE strings(a)", $db);
-
-foreach ($data as $str) {
- sqlite_query("INSERT INTO strings VALUES('" . sqlite_escape_string($str) . "')", $db);
-}
-
-function cat_step(&$context, $string)
-{
- $context .= $string;
-}
-
-function cat_fin(&$context)
-{
- return $context;
-}
-
-sqlite_create_aggregate($db, "cat", "cat_step", "cat_fin");
-
-$r = sqlite_query("SELECT cat(a) from strings", $db);
-while ($row = sqlite_fetch_array($r, SQLITE_NUM)) {
- var_dump($row);
-}
-
-sqlite_close($db);
-
-echo "DONE!\n";
-?>
---EXPECT--
-array(1) {
- [0]=>
- string(11) "onetwothree"
-}
-DONE!
diff --git a/ext/sqlite/tests/sqlite_006.phpt b/ext/sqlite/tests/sqlite_006.phpt
deleted file mode 100644
index 4e6e5f19ed..0000000000
--- a/ext/sqlite/tests/sqlite_006.phpt
+++ /dev/null
@@ -1,55 +0,0 @@
---TEST--
-sqlite: regular functions
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-$data = array(
- array("one", "uno"),
- array("two", "dos"),
- array("three", "tres"),
- );
-
-sqlite_query("CREATE TABLE strings(a,b)", $db);
-
-function implode_args()
-{
- $args = func_get_args();
- $sep = array_shift($args);
- return implode($sep, $args);
-}
-
-foreach ($data as $row) {
- sqlite_query("INSERT INTO strings VALUES('" . sqlite_escape_string($row[0]) . "','" . sqlite_escape_string($row[1]) . "')", $db);
-}
-
-sqlite_create_function($db, "implode", "implode_args");
-
-$r = sqlite_query("SELECT implode('-', a, b) from strings", $db);
-while ($row = sqlite_fetch_array($r, SQLITE_NUM)) {
- var_dump($row);
-}
-
-sqlite_close($db);
-
-echo "DONE!\n";
-?>
---EXPECT--
-array(1) {
- [0]=>
- string(7) "one-uno"
-}
-array(1) {
- [0]=>
- string(7) "two-dos"
-}
-array(1) {
- [0]=>
- string(10) "three-tres"
-}
-DONE!
diff --git a/ext/sqlite/tests/sqlite_007.phpt b/ext/sqlite/tests/sqlite_007.phpt
deleted file mode 100755
index 5a1e536188..0000000000
--- a/ext/sqlite/tests/sqlite_007.phpt
+++ /dev/null
@@ -1,52 +0,0 @@
---TEST--
-sqlite: Simple insert/select (unbuffered)
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-sqlite_query("CREATE TABLE foo(c1 date, c2 time, c3 varchar(64))", $db);
-sqlite_query("INSERT INTO foo VALUES ('2002-01-02', '12:49:00', NULL)", $db);
-$r = sqlite_unbuffered_query("SELECT * from foo", $db);
-var_dump(sqlite_fetch_array($r, SQLITE_BOTH));
-$r = sqlite_unbuffered_query("SELECT * from foo", $db);
-var_dump(sqlite_fetch_array($r, SQLITE_NUM));
-$r = sqlite_unbuffered_query("SELECT * from foo", $db);
-var_dump(sqlite_fetch_array($r, SQLITE_ASSOC));
-sqlite_close($db);
-?>
---EXPECT--
-array(6) {
- [0]=>
- string(10) "2002-01-02"
- ["c1"]=>
- string(10) "2002-01-02"
- [1]=>
- string(8) "12:49:00"
- ["c2"]=>
- string(8) "12:49:00"
- [2]=>
- NULL
- ["c3"]=>
- NULL
-}
-array(3) {
- [0]=>
- string(10) "2002-01-02"
- [1]=>
- string(8) "12:49:00"
- [2]=>
- NULL
-}
-array(3) {
- ["c1"]=>
- string(10) "2002-01-02"
- ["c2"]=>
- string(8) "12:49:00"
- ["c3"]=>
- NULL
-}
diff --git a/ext/sqlite/tests/sqlite_008.phpt b/ext/sqlite/tests/sqlite_008.phpt
deleted file mode 100755
index ee485c76a1..0000000000
--- a/ext/sqlite/tests/sqlite_008.phpt
+++ /dev/null
@@ -1,46 +0,0 @@
---TEST--
-sqlite: fetch all (buffered)
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-$data = array(
- "one",
- "two",
- "three"
- );
-
-sqlite_query("CREATE TABLE strings(a VARCHAR)", $db);
-
-foreach ($data as $str) {
- sqlite_query("INSERT INTO strings VALUES('$str')", $db);
-}
-
-$r = sqlite_query("SELECT a from strings", $db);
-while ($row = sqlite_fetch_array($r, SQLITE_NUM)) {
- var_dump($row);
-}
-
-sqlite_close($db);
-
-echo "DONE!\n";
-?>
---EXPECT--
-array(1) {
- [0]=>
- string(3) "one"
-}
-array(1) {
- [0]=>
- string(3) "two"
-}
-array(1) {
- [0]=>
- string(5) "three"
-}
-DONE!
diff --git a/ext/sqlite/tests/sqlite_009.phpt b/ext/sqlite/tests/sqlite_009.phpt
deleted file mode 100755
index bdad770b57..0000000000
--- a/ext/sqlite/tests/sqlite_009.phpt
+++ /dev/null
@@ -1,46 +0,0 @@
---TEST--
-sqlite: fetch all (unbuffered)
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-$data = array(
- "one",
- "two",
- "three"
- );
-
-sqlite_query("CREATE TABLE strings(a VARCHAR)", $db);
-
-foreach ($data as $str) {
- sqlite_query("INSERT INTO strings VALUES('$str')", $db);
-}
-
-$r = sqlite_unbuffered_query("SELECT a from strings", $db);
-while ($row = sqlite_fetch_array($r, SQLITE_NUM)) {
- var_dump($row);
-}
-
-sqlite_close($db);
-
-echo "DONE!\n";
-?>
---EXPECT--
-array(1) {
- [0]=>
- string(3) "one"
-}
-array(1) {
- [0]=>
- string(3) "two"
-}
-array(1) {
- [0]=>
- string(5) "three"
-}
-DONE!
diff --git a/ext/sqlite/tests/sqlite_010.phpt b/ext/sqlite/tests/sqlite_010.phpt
deleted file mode 100755
index 152fde4cf0..0000000000
--- a/ext/sqlite/tests/sqlite_010.phpt
+++ /dev/null
@@ -1,81 +0,0 @@
---TEST--
-sqlite: fetch all (iterator)
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-$data = array(
- "one",
- "two",
- "three"
- );
-
-sqlite_query("CREATE TABLE strings(a VARCHAR)", $db);
-
-foreach ($data as $str) {
- sqlite_query("INSERT INTO strings VALUES('$str')", $db);
-}
-
-$r = sqlite_unbuffered_query("SELECT a from strings", $db);
-while (sqlite_valid($r)) {
- var_dump(sqlite_current($r, SQLITE_NUM));
- sqlite_next($r);
-}
-$r = sqlite_query("SELECT a from strings", $db);
-while (sqlite_valid($r)) {
- var_dump(sqlite_current($r, SQLITE_NUM));
- sqlite_next($r);
-}
-sqlite_rewind($r);
-while (sqlite_valid($r)) {
- var_dump(sqlite_current($r, SQLITE_NUM));
- sqlite_next($r);
-}
-
-sqlite_close($db);
-
-echo "DONE!\n";
-?>
---EXPECT--
-array(1) {
- [0]=>
- string(3) "one"
-}
-array(1) {
- [0]=>
- string(3) "two"
-}
-array(1) {
- [0]=>
- string(5) "three"
-}
-array(1) {
- [0]=>
- string(3) "one"
-}
-array(1) {
- [0]=>
- string(3) "two"
-}
-array(1) {
- [0]=>
- string(5) "three"
-}
-array(1) {
- [0]=>
- string(3) "one"
-}
-array(1) {
- [0]=>
- string(3) "two"
-}
-array(1) {
- [0]=>
- string(5) "three"
-}
-DONE!
diff --git a/ext/sqlite/tests/sqlite_011.phpt b/ext/sqlite/tests/sqlite_011.phpt
deleted file mode 100755
index 9c1bf3990f..0000000000
--- a/ext/sqlite/tests/sqlite_011.phpt
+++ /dev/null
@@ -1,34 +0,0 @@
---TEST--
-sqlite: returned associative column names
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-sqlite_query("CREATE TABLE foo (c1 char, c2 char, c3 char)", $db);
-sqlite_query("CREATE TABLE bar (c1 char, c2 char, c3 char)", $db);
-sqlite_query("INSERT INTO foo VALUES ('1', '2', '3')", $db);
-sqlite_query("INSERT INTO bar VALUES ('4', '5', '6')", $db);
-$r = sqlite_query("SELECT * from foo, bar", $db, SQLITE_ASSOC);
-var_dump(sqlite_fetch_array($r));
-sqlite_close($db);
-?>
---EXPECT--
-array(6) {
- ["foo.c1"]=>
- string(1) "1"
- ["foo.c2"]=>
- string(1) "2"
- ["foo.c3"]=>
- string(1) "3"
- ["bar.c1"]=>
- string(1) "4"
- ["bar.c2"]=>
- string(1) "5"
- ["bar.c3"]=>
- string(1) "6"
-}
diff --git a/ext/sqlite/tests/sqlite_012.phpt b/ext/sqlite/tests/sqlite_012.phpt
deleted file mode 100755
index 14d9ea4f53..0000000000
--- a/ext/sqlite/tests/sqlite_012.phpt
+++ /dev/null
@@ -1,38 +0,0 @@
---TEST--
-sqlite: read field names
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-sqlite_query("CREATE TABLE strings(foo VARCHAR, bar VARCHAR, baz VARCHAR)", $db);
-
-echo "Buffered\n";
-$r = sqlite_query("SELECT * from strings", $db);
-for($i=0; $i<sqlite_num_fields($r); $i++) {
- var_dump(sqlite_field_name($r, $i));
-}
-echo "Unbuffered\n";
-$r = sqlite_unbuffered_query("SELECT * from strings", $db);
-for($i=0; $i<sqlite_num_fields($r); $i++) {
- var_dump(sqlite_field_name($r, $i));
-}
-
-sqlite_close($db);
-
-echo "DONE!\n";
-?>
---EXPECT--
-Buffered
-string(3) "foo"
-string(3) "bar"
-string(3) "baz"
-Unbuffered
-string(3) "foo"
-string(3) "bar"
-string(3) "baz"
-DONE!
diff --git a/ext/sqlite/tests/sqlite_013.phpt b/ext/sqlite/tests/sqlite_013.phpt
deleted file mode 100755
index 95b047a75c..0000000000
--- a/ext/sqlite/tests/sqlite_013.phpt
+++ /dev/null
@@ -1,78 +0,0 @@
---TEST--
-sqlite: fetch column
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-$data = array(
- array (0 => 'one', 1 => 'two'),
- array (0 => 'three', 1 => 'four')
- );
-
-sqlite_query("CREATE TABLE strings(a VARCHAR, b VARCHAR)", $db);
-
-foreach ($data as $str) {
- sqlite_query("INSERT INTO strings VALUES('${str[0]}','${str[1]}')", $db);
-}
-
-echo "====BUFFERED====\n";
-$r = sqlite_query("SELECT a, b from strings", $db);
-while (sqlite_valid($r)) {
- var_dump(sqlite_current($r, SQLITE_NUM));
- var_dump(sqlite_column($r, 0));
- var_dump(sqlite_column($r, 1));
- var_dump(sqlite_column($r, 'a'));
- var_dump(sqlite_column($r, 'b'));
- sqlite_next($r);
-}
-echo "====UNBUFFERED====\n";
-$r = sqlite_unbuffered_query("SELECT a, b from strings", $db);
-while (sqlite_valid($r)) {
- var_dump(sqlite_column($r, 0));
- var_dump(sqlite_column($r, 'b'));
- var_dump(sqlite_column($r, 1));
- var_dump(sqlite_column($r, 'a'));
- sqlite_next($r);
-}
-
-sqlite_close($db);
-
-echo "DONE!\n";
-?>
---EXPECT--
-====BUFFERED====
-array(2) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
-}
-string(3) "one"
-string(3) "two"
-string(3) "one"
-string(3) "two"
-array(2) {
- [0]=>
- string(5) "three"
- [1]=>
- string(4) "four"
-}
-string(5) "three"
-string(4) "four"
-string(5) "three"
-string(4) "four"
-====UNBUFFERED====
-string(3) "one"
-string(3) "two"
-NULL
-NULL
-string(5) "three"
-string(4) "four"
-NULL
-NULL
-DONE!
diff --git a/ext/sqlite/tests/sqlite_014.phpt b/ext/sqlite/tests/sqlite_014.phpt
deleted file mode 100755
index 967fcc10fa..0000000000
--- a/ext/sqlite/tests/sqlite_014.phpt
+++ /dev/null
@@ -1,120 +0,0 @@
---TEST--
-sqlite: fetch all (fetch_all)
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-$data = array(
- "one",
- "two",
- "three"
- );
-
-sqlite_query("CREATE TABLE strings(a VARCHAR)", $db);
-
-foreach ($data as $str) {
- sqlite_query("INSERT INTO strings VALUES('$str')", $db);
-}
-
-echo "unbuffered twice\n";
-$r = sqlite_unbuffered_query("SELECT a from strings", $db, SQLITE_NUM);
-var_dump(sqlite_fetch_all($r));
-var_dump(sqlite_fetch_all($r));
-
-echo "unbuffered with fetch_array\n";
-$r = sqlite_unbuffered_query("SELECT a from strings", $db, SQLITE_NUM);
-var_dump(sqlite_fetch_array($r));
-var_dump(sqlite_fetch_all($r));
-
-echo "buffered\n";
-$r = sqlite_query("SELECT a from strings", $db, SQLITE_NUM);
-var_dump(sqlite_fetch_all($r));
-var_dump(sqlite_fetch_array($r));
-var_dump(sqlite_fetch_all($r));
-
-sqlite_close($db);
-
-echo "DONE!\n";
-?>
---EXPECTF--
-unbuffered twice
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- string(3) "one"
- }
- [1]=>
- array(1) {
- [0]=>
- string(3) "two"
- }
- [2]=>
- array(1) {
- [0]=>
- string(5) "three"
- }
-}
-
-Warning: sqlite_fetch_all(): One or more rowsets were already returned; returning NULL this time in %ssqlite_014.php on line %d
-array(0) {
-}
-unbuffered with fetch_array
-array(1) {
- [0]=>
- string(3) "one"
-}
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- string(3) "two"
- }
- [1]=>
- array(1) {
- [0]=>
- string(5) "three"
- }
-}
-buffered
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- string(3) "one"
- }
- [1]=>
- array(1) {
- [0]=>
- string(3) "two"
- }
- [2]=>
- array(1) {
- [0]=>
- string(5) "three"
- }
-}
-bool(false)
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- string(3) "one"
- }
- [1]=>
- array(1) {
- [0]=>
- string(3) "two"
- }
- [2]=>
- array(1) {
- [0]=>
- string(5) "three"
- }
-}
-DONE!
diff --git a/ext/sqlite/tests/sqlite_015.phpt b/ext/sqlite/tests/sqlite_015.phpt
deleted file mode 100755
index 8de42a84b9..0000000000
--- a/ext/sqlite/tests/sqlite_015.phpt
+++ /dev/null
@@ -1,49 +0,0 @@
---TEST--
-sqlite: fetch all (array_query)
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-$data = array(
- "one",
- "two",
- "three"
- );
-
-sqlite_query("CREATE TABLE strings(a VARCHAR)", $db);
-
-foreach ($data as $str) {
- sqlite_query("INSERT INTO strings VALUES('$str')", $db);
-}
-
-$res = sqlite_array_query("SELECT a from strings", $db, SQLITE_NUM);
-var_dump($res);
-
-$db = null;
-
-echo "DONE!\n";
-?>
---EXPECTF--
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- string(3) "one"
- }
- [1]=>
- array(1) {
- [0]=>
- string(3) "two"
- }
- [2]=>
- array(1) {
- [0]=>
- string(5) "three"
- }
-}
-DONE!
diff --git a/ext/sqlite/tests/sqlite_016.phpt b/ext/sqlite/tests/sqlite_016.phpt
deleted file mode 100755
index 9ca9de135f..0000000000
--- a/ext/sqlite/tests/sqlite_016.phpt
+++ /dev/null
@@ -1,45 +0,0 @@
---TEST--
-sqlite: fetch single
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-$data = array(
- array (0 => 'one', 1 => 'two'),
- array (0 => 'three', 1 => 'four')
- );
-
-sqlite_query("CREATE TABLE strings(a VARCHAR, b VARCHAR)", $db);
-
-foreach ($data as $str) {
- sqlite_query("INSERT INTO strings VALUES('${str[0]}','${str[1]}')", $db);
-}
-
-echo "====BUFFERED====\n";
-$r = sqlite_query("SELECT a, b from strings", $db);
-while (sqlite_valid($r)) {
- var_dump(sqlite_fetch_single($r));
-}
-echo "====UNBUFFERED====\n";
-$r = sqlite_unbuffered_query("SELECT a, b from strings", $db);
-while (sqlite_valid($r)) {
- var_dump(sqlite_fetch_single($r));
-}
-
-sqlite_close($db);
-
-echo "DONE!\n";
-?>
---EXPECT--
-====BUFFERED====
-string(3) "one"
-string(5) "three"
-====UNBUFFERED====
-string(3) "one"
-string(5) "three"
-DONE!
diff --git a/ext/sqlite/tests/sqlite_017.phpt b/ext/sqlite/tests/sqlite_017.phpt
deleted file mode 100755
index 9058622f99..0000000000
--- a/ext/sqlite/tests/sqlite_017.phpt
+++ /dev/null
@@ -1,33 +0,0 @@
---TEST--
-sqlite: UDF binary handling functions
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-
-$data = array(
- "hello there",
- "this has a \x00 char in the middle",
- "\x01 this has an 0x01 at the start",
- "this has \x01 in the middle"
- );
-
-foreach ($data as $item) {
- $coded = sqlite_udf_encode_binary($item);
- echo bin2hex($coded) . "\n";
- $decoded = sqlite_udf_decode_binary($coded);
- if ($item != $decoded) {
- echo "FAIL! $item decoded is $decoded\n";
- }
-}
-
-echo "OK!\n";
-
-?>
---EXPECT--
-68656c6c6f207468657265
-0101736768721f6760721f601fff1f626760711f686d1f7367641f6c6863636b64
-0102ff1e726667711e665f711e5f6c1e2e762e2f1e5f721e7266631e71725f7072
-7468697320686173200120696e20746865206d6964646c65
-OK!
diff --git a/ext/sqlite/tests/sqlite_018.phpt b/ext/sqlite/tests/sqlite_018.phpt
deleted file mode 100755
index 8d80649be8..0000000000
--- a/ext/sqlite/tests/sqlite_018.phpt
+++ /dev/null
@@ -1,14 +0,0 @@
---TEST--
-sqlite: crash on bad queries inside sqlite_array_query()
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-sqlite_array_query($db, "SELECT foo FROM foobar");
-sqlite_close($db);
-?>
---EXPECTF--
-Warning: sqlite_array_query(): no such table: foobar in %s on line %d
diff --git a/ext/sqlite/tests/sqlite_019.phpt b/ext/sqlite/tests/sqlite_019.phpt
deleted file mode 100755
index 74dcff99fa..0000000000
--- a/ext/sqlite/tests/sqlite_019.phpt
+++ /dev/null
@@ -1,47 +0,0 @@
---TEST--
-sqlite: single query
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-sqlite_query($db, "CREATE TABLE test_db ( id INTEGER PRIMARY KEY, data VARCHAR(100) )");
-for ($i = 0; $i < 10; $i++) {
- sqlite_query($db, "INSERT INTO test_db (data) VALUES('{$i}data')");
-}
-sqlite_query($db, "INSERT INTO test_db (data) VALUES(NULL)");
-
-var_dump(sqlite_single_query($db, "SELECT id FROM test_db WHERE id=5"));
-var_dump(sqlite_single_query($db, "SELECT * FROM test_db WHERE id=4"));
-var_dump(sqlite_single_query($db, "SELECT data FROM test_db WHERE id=6"));
-var_dump(sqlite_single_query($db, "SELECT * FROM test_db WHERE id < 5"));
-var_dump(sqlite_single_query($db, "SELECT * FROM test db WHERE id < 4"));
-var_dump(sqlite_single_query($db, "SELECT * FROM test_db WHERE id=999999"));
-var_dump(sqlite_single_query($db, "SELECT id FROM test_db WHERE id=5", FALSE));
-
-sqlite_close($db);
-?>
---EXPECTF--
-string(1) "5"
-string(1) "4"
-string(5) "5data"
-array(4) {
- [0]=>
- string(1) "1"
- [1]=>
- string(1) "2"
- [2]=>
- string(1) "3"
- [3]=>
- string(1) "4"
-}
-
-Warning: sqlite_single_query(): no such table: test in %s on line %d
-bool(false)
-NULL
-array(1) {
- [0]=>
- string(1) "5"
-}
diff --git a/ext/sqlite/tests/sqlite_022.phpt b/ext/sqlite/tests/sqlite_022.phpt
deleted file mode 100755
index 76921d56f6..0000000000
--- a/ext/sqlite/tests/sqlite_022.phpt
+++ /dev/null
@@ -1,101 +0,0 @@
---TEST--
-sqlite: sqlite_seek
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-$data = array(
- "one",
- "two",
- "three"
- );
-
-sqlite_query("CREATE TABLE strings(a)", $db);
-
-foreach ($data as $str) {
- sqlite_query("INSERT INTO strings VALUES('$str')", $db);
-}
-
-$res = sqlite_query("SELECT a FROM strings", $db, SQLITE_NUM);
-for ($idx = -1; $idx < 4; $idx++) {
- echo "====SEEK:$idx====\n";
- sqlite_seek($res, $idx);
- var_dump(sqlite_current($res));
-}
-echo "====AGAIN====\n";
-for ($idx = -1; $idx < 4; $idx++) {
- echo "====SEEK:$idx====\n";
- sqlite_seek($res, $idx);
- var_dump(sqlite_current($res));
-}
-
-sqlite_close($db);
-
-echo "====DONE!====\n";
-?>
---EXPECTF--
-====SEEK:-1====
-
-Warning: sqlite_seek(): row -1 out of range in %ssqlite_022.php on line %d
-array(1) {
- [0]=>
- string(3) "one"
-}
-====SEEK:0====
-array(1) {
- [0]=>
- string(3) "one"
-}
-====SEEK:1====
-array(1) {
- [0]=>
- string(3) "two"
-}
-====SEEK:2====
-array(1) {
- [0]=>
- string(5) "three"
-}
-====SEEK:3====
-
-Warning: sqlite_seek(): row 3 out of range in %ssqlite_022.php on line %d
-array(1) {
- [0]=>
- string(5) "three"
-}
-====AGAIN====
-====SEEK:-1====
-
-Warning: sqlite_seek(): row -1 out of range in %ssqlite_022.php on line %d
-array(1) {
- [0]=>
- string(5) "three"
-}
-====SEEK:0====
-array(1) {
- [0]=>
- string(3) "one"
-}
-====SEEK:1====
-array(1) {
- [0]=>
- string(3) "two"
-}
-====SEEK:2====
-array(1) {
- [0]=>
- string(5) "three"
-}
-====SEEK:3====
-
-Warning: sqlite_seek(): row 3 out of range in %ssqlite_022.php on line %d
-array(1) {
- [0]=>
- string(5) "three"
-}
-====DONE!====
diff --git a/ext/sqlite/tests/sqlite_023.phpt b/ext/sqlite/tests/sqlite_023.phpt
deleted file mode 100644
index fbb8dc8da8..0000000000
--- a/ext/sqlite/tests/sqlite_023.phpt
+++ /dev/null
@@ -1,105 +0,0 @@
---TEST--
-sqlite: sqlite_[has_]prev
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-$data = array(
- "one",
- "two",
- "three"
- );
-
-sqlite_query("CREATE TABLE strings(a)", $db);
-
-foreach ($data as $str) {
- sqlite_query("INSERT INTO strings VALUES('$str')", $db);
-}
-
-$r = sqlite_query("SELECT a FROM strings", $db, SQLITE_NUM);
-
-echo "====TRAVERSE====\n";
-for(sqlite_rewind($r); sqlite_valid($r); sqlite_next($r)) {
- var_dump(sqlite_current($r));
-
-}
-echo "====REVERSE====\n";
-do {
- sqlite_prev($r);
- var_dump(sqlite_current($r));
-} while(sqlite_has_prev($r));
-
-echo "====UNBUFFERED====\n";
-
-$r = sqlite_unbuffered_query("SELECT a FROM strings", $db, SQLITE_NUM);
-
-echo "====TRAVERSE====\n";
-for(sqlite_rewind($r); sqlite_valid($r); sqlite_next($r)) {
- var_dump(sqlite_current($r));
-
-}
-echo "====REVERSE====\n";
-do {
- sqlite_prev($r);
- var_dump(sqlite_current($r));
-} while(sqlite_has_prev($r));
-
-sqlite_close($db);
-
-echo "====DONE!====\n";
-?>
---EXPECTF--
-====TRAVERSE====
-array(1) {
- [0]=>
- string(3) "one"
-}
-array(1) {
- [0]=>
- string(3) "two"
-}
-array(1) {
- [0]=>
- string(5) "three"
-}
-====REVERSE====
-array(1) {
- [0]=>
- string(5) "three"
-}
-array(1) {
- [0]=>
- string(3) "two"
-}
-array(1) {
- [0]=>
- string(3) "one"
-}
-====UNBUFFERED====
-====TRAVERSE====
-
-Warning: sqlite_rewind(): Cannot rewind an unbuffered result set in %ssqlite_023.php on line %d
-array(1) {
- [0]=>
- string(3) "one"
-}
-array(1) {
- [0]=>
- string(3) "two"
-}
-array(1) {
- [0]=>
- string(5) "three"
-}
-====REVERSE====
-
-Warning: sqlite_prev(): you cannot use sqlite_prev on unbuffered querys in %ssqlite_023.php on line %d
-bool(false)
-
-Warning: sqlite_has_prev(): you cannot use sqlite_has_prev on unbuffered querys in %ssqlite_023.php on line %d
-====DONE!====
diff --git a/ext/sqlite/tests/sqlite_024.phpt b/ext/sqlite/tests/sqlite_024.phpt
deleted file mode 100755
index b7198c0155..0000000000
--- a/ext/sqlite/tests/sqlite_024.phpt
+++ /dev/null
@@ -1,76 +0,0 @@
---TEST--
-sqlite: sqlite_fetch_object
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-class class24 {
- function __construct() {
- echo __METHOD__ . "\n";
- }
-}
-
-$data = array(
- "one",
- "two",
- "three"
- );
-
-sqlite_query($db, "CREATE TABLE strings(a)");
-
-foreach ($data as $str) {
- sqlite_query($db, "INSERT INTO strings VALUES('$str')");
-}
-
-echo "====class24====\n";
-$res = sqlite_query($db, "SELECT a FROM strings", SQLITE_ASSOC);
-while (sqlite_valid($res)) {
- var_dump(sqlite_fetch_object($res, 'class24'));
-}
-
-echo "====stdclass====\n";
-$res = sqlite_query($db, "SELECT a FROM strings", SQLITE_ASSOC);
-while (sqlite_valid($res)) {
- var_dump(sqlite_fetch_object($res));
-}
-
-sqlite_close($db);
-
-echo "====DONE!====\n";
-?>
---EXPECTF--
-====class24====
-class24::__construct
-object(class24)#%d (1) {
- ["a"]=>
- string(3) "one"
-}
-class24::__construct
-object(class24)#%d (1) {
- ["a"]=>
- string(3) "two"
-}
-class24::__construct
-object(class24)#%d (1) {
- ["a"]=>
- string(5) "three"
-}
-====stdclass====
-object(stdClass)#%d (1) {
- ["a"]=>
- string(3) "one"
-}
-object(stdClass)#%d (1) {
- ["a"]=>
- string(3) "two"
-}
-object(stdClass)#%d (1) {
- ["a"]=>
- string(5) "three"
-}
-====DONE!====
diff --git a/ext/sqlite/tests/sqlite_025.phpt b/ext/sqlite/tests/sqlite_025.phpt
deleted file mode 100755
index 0a257610cc..0000000000
--- a/ext/sqlite/tests/sqlite_025.phpt
+++ /dev/null
@@ -1,38 +0,0 @@
---TEST--
-sqlite: sqlite_fetch_object in a loop
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-sqlite_query($db, "CREATE TABLE strings(a)");
-
-foreach (array("one", "two", "three") as $str) {
- sqlite_query($db, "INSERT INTO strings VALUES('$str')");
-}
-
-$res = sqlite_query("SELECT * FROM strings", $db);
-
-while (($obj = sqlite_fetch_object($res))) {
- var_dump($obj);
-}
-
-sqlite_close($db);
-?>
---EXPECTF--
-object(stdClass)#1 (1) {
- ["a"]=>
- string(3) "one"
-}
-object(stdClass)#2 (1) {
- ["a"]=>
- string(3) "two"
-}
-object(stdClass)#1 (1) {
- ["a"]=>
- string(5) "three"
-} \ No newline at end of file
diff --git a/ext/sqlite/tests/sqlite_026.phpt b/ext/sqlite/tests/sqlite_026.phpt
deleted file mode 100755
index c508979a27..0000000000
--- a/ext/sqlite/tests/sqlite_026.phpt
+++ /dev/null
@@ -1,27 +0,0 @@
---TEST--
-sqlite: sqlite_fetch_column_types
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-sqlite_query($db, "CREATE TABLE strings(a, b INTEGER, c VARCHAR(10), d)");
-sqlite_query($db, "INSERT INTO strings VALUES('1', '2', '3', 'abc')");
-
-var_dump(sqlite_fetch_column_types($db, "strings"));
-
-sqlite_close($db);
-?>
---EXPECT--
-array(4) {
- ["a"]=>
- string(0) ""
- ["b"]=>
- string(7) "INTEGER"
- ["c"]=>
- string(11) "VARCHAR(10)"
- ["d"]=>
- string(0) ""
-}
diff --git a/ext/sqlite/tests/sqlite_027.phpt b/ext/sqlite/tests/sqlite_027.phpt
deleted file mode 100755
index 7919f2c3f7..0000000000
--- a/ext/sqlite/tests/sqlite_027.phpt
+++ /dev/null
@@ -1,15 +0,0 @@
---TEST--
-sqlite: crash inside sqlite_escape_string() & sqlite_udf_encode_binary
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---INI--
-memory_limit=-1
---FILE--
-<?php
- var_dump(strlen(sqlite_escape_string(str_repeat("\0", 20000000))));
- var_dump(strlen(sqlite_udf_encode_binary(str_repeat("\0", 20000000))));
-?>
---EXPECT--
-int(20000002)
-int(20000002)
diff --git a/ext/sqlite/tests/sqlite_closures_001.phpt b/ext/sqlite/tests/sqlite_closures_001.phpt
deleted file mode 100755
index 8a90d1e5e0..0000000000
--- a/ext/sqlite/tests/sqlite_closures_001.phpt
+++ /dev/null
@@ -1,54 +0,0 @@
---TEST--
-sqlite: aggregate functions with closures
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-$data = array(
- "one",
- "two",
- "three"
- );
-
-sqlite_query("CREATE TABLE strings(a)", $db);
-
-foreach ($data as $str) {
- sqlite_query("INSERT INTO strings VALUES('" . sqlite_escape_string($str) . "')", $db);
-}
-
-function cat_step(&$context, $string)
-{
- $context .= $string;
-}
-
-function cat_fin(&$context)
-{
- return $context;
-}
-
-sqlite_create_aggregate($db, "cat", function (&$context, $string) {
- $context .= $string;
-}, function (&$context) {
- return $context;
-});
-
-$r = sqlite_query("SELECT cat(a) from strings", $db);
-while ($row = sqlite_fetch_array($r, SQLITE_NUM)) {
- var_dump($row);
-}
-
-sqlite_close($db);
-
-echo "DONE!\n";
-?>
---EXPECT--
-array(1) {
- [0]=>
- string(11) "onetwothree"
-}
-DONE!
diff --git a/ext/sqlite/tests/sqlite_closures_002.phpt b/ext/sqlite/tests/sqlite_closures_002.phpt
deleted file mode 100755
index e880bb1733..0000000000
--- a/ext/sqlite/tests/sqlite_closures_002.phpt
+++ /dev/null
@@ -1,52 +0,0 @@
---TEST--
-sqlite: regular functions with closures
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb.inc";
-
-$data = array(
- array("one", "uno"),
- array("two", "dos"),
- array("three", "tres"),
- );
-
-sqlite_query("CREATE TABLE strings(a,b)", $db);
-
-foreach ($data as $row) {
- sqlite_query("INSERT INTO strings VALUES('" . sqlite_escape_string($row[0]) . "','" . sqlite_escape_string($row[1]) . "')", $db);
-}
-
-sqlite_create_function($db, "implode", function () {
- $args = func_get_args();
- $sep = array_shift($args);
- return implode($sep, $args);
-});
-
-$r = sqlite_query("SELECT implode('-', a, b) from strings", $db);
-while ($row = sqlite_fetch_array($r, SQLITE_NUM)) {
- var_dump($row);
-}
-
-sqlite_close($db);
-
-echo "DONE!\n";
-?>
---EXPECT--
-array(1) {
- [0]=>
- string(7) "one-uno"
-}
-array(1) {
- [0]=>
- string(7) "two-dos"
-}
-array(1) {
- [0]=>
- string(10) "three-tres"
-}
-DONE!
diff --git a/ext/sqlite/tests/sqlite_exec_basic.phpt b/ext/sqlite/tests/sqlite_exec_basic.phpt
deleted file mode 100644
index e7e13db044..0000000000
--- a/ext/sqlite/tests/sqlite_exec_basic.phpt
+++ /dev/null
@@ -1,34 +0,0 @@
---TEST--
-Test sqlite_exec() function : basic functionality
---SKIPIF--
-<?php if (!extension_loaded("sqlite")) print "skip sqlite extension not loaded"; ?>
---FILE--
-<?php
-/* Prototype : boolean sqlite_exec(string query, resource db[, string &error_message])
- * Description: Executes a result-less query against a given database
- * Source code: ext/sqlite/sqlite.c
- * Alias to functions:
- */
-
-echo "*** Testing sqlite_exec() : basic functionality ***\n";
-
-// set up variables
-$query = 'CREATE TABLE foobar (id INTEGER PRIMARY KEY, name CHAR(255));';
-$error_message = null;
-
-// procedural
-$db = sqlite_open(':memory:');
-var_dump( sqlite_exec($db, $query) );
-sqlite_close($db);
-
-// oo-style
-$db = new SQLiteDatabase(':memory:');
-var_dump( $db->queryExec($query, $error_message) );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing sqlite_exec() : basic functionality ***
-bool(true)
-bool(true)
-===DONE===
diff --git a/ext/sqlite/tests/sqlite_exec_error.phpt b/ext/sqlite/tests/sqlite_exec_error.phpt
deleted file mode 100644
index 74cfa9a3e8..0000000000
--- a/ext/sqlite/tests/sqlite_exec_error.phpt
+++ /dev/null
@@ -1,44 +0,0 @@
---TEST--
-Test sqlite_exec() function : error behaviour and functionality
---SKIPIF--
-<?php if (!extension_loaded("sqlite")) print "skip sqlite extension not loaded"; ?>
---FILE--
-<?php
-/* Prototype : boolean sqlite_exec(string query, resource db[, string &error_message])
- * Description: Executes a result-less query against a given database
- * Source code: ext/sqlite/sqlite.c
- * Alias to functions:
- */
-
-echo "*** Testing sqlite_exec() : error functionality ***\n";
-
-// set up variables
-$fail = 'CRE ATE TABLE';
-$error_message = null;
-
-// procedural
-$db = sqlite_open(':memory:');
-var_dump( sqlite_exec($db, $fail, $error_message) );
-var_dump( $error_message );
-var_dump( sqlite_exec($db) );
-sqlite_close($db);
-
-// oo-style
-$db = new SQLiteDatabase(':memory:');
-var_dump( $db->queryExec($fail, $error_message, 'fooparam') );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing sqlite_exec() : error functionality ***
-
-Warning: sqlite_exec(): near "CRE": syntax error in %s on line %d
-bool(false)
-%string|unicode%(24) "near "CRE": syntax error"
-
-Warning: sqlite_exec() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: SQLiteDatabase::queryExec() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/sqlite/tests/sqlite_last_error_basic.phpt b/ext/sqlite/tests/sqlite_last_error_basic.phpt
deleted file mode 100644
index f3a7b8320e..0000000000
--- a/ext/sqlite/tests/sqlite_last_error_basic.phpt
+++ /dev/null
@@ -1,48 +0,0 @@
---TEST--
-Test sqlite_last_error() function : basic functionality
---SKIPIF--
-<?php if (!extension_loaded("sqlite")) print "skip sqlite extension not loaded"; ?>
---FILE--
-<?php
-/* Prototype : int sqlite_last_error(resource db)
- * Description: Returns the error code of the last error for a database.
- * Source code: ext/sqlite/sqlite.c
- * Alias to functions:
- */
-
-echo "*** Testing sqlite_last_error() : basic functionality ***\n";
-
-// set up variables
-$query = 'CREATE TAB LE foobar (id INTEGER PRIMARY KEY, name CHAR(255));';
-$query_ok = 'CREATE TABLE foobar (id INTEGER, name CHAR(255));';
-
-// procedural
-$db = sqlite_open(':memory:');
-var_dump( sqlite_last_error($db) === SQLITE_OK );
-sqlite_exec($db, $query);
-var_dump( sqlite_last_error($db) === SQLITE_ERROR );
-sqlite_exec($db, $query_ok);
-var_dump( sqlite_last_error($db) === SQLITE_OK );
-sqlite_close($db);
-
-// oo-style
-$db = new SQLiteDatabase(':memory:');
-$db->queryExec($query);
-var_dump( $db->lastError() === SQLITE_ERROR );
-$db->queryExec($query_ok);
-var_dump( $db->lastError() === SQLITE_OK );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing sqlite_last_error() : basic functionality ***
-bool(true)
-
-Warning: sqlite_exec(): near "TAB": syntax error in %s on line %d
-bool(true)
-bool(true)
-
-Warning: SQLiteDatabase::queryExec(): near "TAB": syntax error in %s on line %d
-bool(true)
-bool(true)
-===DONE===
diff --git a/ext/sqlite/tests/sqlite_last_error_error.phpt b/ext/sqlite/tests/sqlite_last_error_error.phpt
deleted file mode 100644
index c930048365..0000000000
--- a/ext/sqlite/tests/sqlite_last_error_error.phpt
+++ /dev/null
@@ -1,47 +0,0 @@
---TEST--
-Test sqlite_last_error() function : error conditions
---SKIPIF--
-<?php if (!extension_loaded("sqlite")) print "skip sqlite extension not loaded"; ?>
---FILE--
-<?php
-/* Prototype : int sqlite_last_error(resource db)
- * Description: Returns the error code of the last error for a database.
- * Source code: ext/sqlite/sqlite.c
- * Alias to functions:
- */
-
-echo "*** Testing sqlite_last_error() : error conditions ***\n";
-
-// Zero arguments
-echo "\n-- Testing sqlite_last_error() function with Zero arguments --\n";
-var_dump( sqlite_last_error() );
-
-//Test sqlite_last_error with one more than the expected number of arguments
-echo "\n-- Testing sqlite_last_error() function with more than expected no. of arguments --\n";
-
-$db = sqlite_open(':memory:');
-$extra_arg = 10;
-var_dump( sqlite_last_error($db, $extra_arg) );
-sqlite_close($db);
-
-$db = new SQLiteDatabase(':memory:');
-var_dump( $db->lastError($extra_arg) );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing sqlite_last_error() : error conditions ***
-
--- Testing sqlite_last_error() function with Zero arguments --
-
-Warning: sqlite_last_error() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing sqlite_last_error() function with more than expected no. of arguments --
-
-Warning: sqlite_last_error() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: SQLiteDatabase::lastError() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/sqlite/tests/sqlite_oo_001.phpt b/ext/sqlite/tests/sqlite_oo_001.phpt
deleted file mode 100755
index 672ddb17b6..0000000000
--- a/ext/sqlite/tests/sqlite_oo_001.phpt
+++ /dev/null
@@ -1,17 +0,0 @@
---TEST--
-sqlite-oo: sqlite_open/close
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-require_once('blankdb_oo.inc');
-var_dump($db);
-$db = NULL;
-echo "Done\n";
-?>
---EXPECTF--
-object(SQLiteDatabase)#%d (0) {
-}
-Done
diff --git a/ext/sqlite/tests/sqlite_oo_002.phpt b/ext/sqlite/tests/sqlite_oo_002.phpt
deleted file mode 100755
index 00a568a2a8..0000000000
--- a/ext/sqlite/tests/sqlite_oo_002.phpt
+++ /dev/null
@@ -1,41 +0,0 @@
---TEST--
-sqlite-oo: Simple insert/select
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-require_once('blankdb_oo.inc');
-var_dump($db);
-
-var_dump($db->query("CREATE TABLE foo(c1 date, c2 time, c3 varchar(64))"));
-var_dump($db->query("INSERT INTO foo VALUES ('2002-01-02', '12:49:00', NULL)"));
-$r = $db->query("SELECT * from foo");
-var_dump($r);
-var_dump($r->fetch());
-?>
---EXPECTF--
-object(SQLiteDatabase)#%d (0) {
-}
-object(SQLiteResult)#%d (0) {
-}
-object(SQLiteResult)#%d (0) {
-}
-object(SQLiteResult)#%d (0) {
-}
-array(6) {
- [0]=>
- string(10) "2002-01-02"
- ["c1"]=>
- string(10) "2002-01-02"
- [1]=>
- string(8) "12:49:00"
- ["c2"]=>
- string(8) "12:49:00"
- [2]=>
- NULL
- ["c3"]=>
- NULL
-}
diff --git a/ext/sqlite/tests/sqlite_oo_003.phpt b/ext/sqlite/tests/sqlite_oo_003.phpt
deleted file mode 100755
index f9ca65c611..0000000000
--- a/ext/sqlite/tests/sqlite_oo_003.phpt
+++ /dev/null
@@ -1,51 +0,0 @@
---TEST--
-sqlite-oo: Simple insert/select, different result representation
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb_oo.inc";
-
-$db->query("CREATE TABLE foo(c1 date, c2 time, c3 varchar(64))");
-$db->query("INSERT INTO foo VALUES ('2002-01-02', '12:49:00', NULL)");
-$r = $db->query("SELECT * from foo");
-var_dump($r->fetch(SQLITE_BOTH));
-$r = $db->query("SELECT * from foo");
-var_dump($r->fetch(SQLITE_NUM));
-$r = $db->query("SELECT * from foo");
-var_dump($r->fetch(SQLITE_ASSOC));
-?>
---EXPECT--
-array(6) {
- [0]=>
- string(10) "2002-01-02"
- ["c1"]=>
- string(10) "2002-01-02"
- [1]=>
- string(8) "12:49:00"
- ["c2"]=>
- string(8) "12:49:00"
- [2]=>
- NULL
- ["c3"]=>
- NULL
-}
-array(3) {
- [0]=>
- string(10) "2002-01-02"
- [1]=>
- string(8) "12:49:00"
- [2]=>
- NULL
-}
-array(3) {
- ["c1"]=>
- string(10) "2002-01-02"
- ["c2"]=>
- string(8) "12:49:00"
- ["c3"]=>
- NULL
-}
diff --git a/ext/sqlite/tests/sqlite_oo_008.phpt b/ext/sqlite/tests/sqlite_oo_008.phpt
deleted file mode 100755
index 8e99a1deaf..0000000000
--- a/ext/sqlite/tests/sqlite_oo_008.phpt
+++ /dev/null
@@ -1,43 +0,0 @@
---TEST--
-sqlite-oo: fetch all (buffered)
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb_oo.inc";
-
-$data = array(
- "one",
- "two",
- "three"
- );
-
-$db->query("CREATE TABLE strings(a VARCHAR)");
-
-foreach ($data as $str) {
- $db->query("INSERT INTO strings VALUES('$str')");
-}
-
-$r = $db->query("SELECT a from strings");
-while ($row = $r->fetch(SQLITE_NUM)) {
- var_dump($row);
-}
-echo "DONE!\n";
-?>
---EXPECT--
-array(1) {
- [0]=>
- string(3) "one"
-}
-array(1) {
- [0]=>
- string(3) "two"
-}
-array(1) {
- [0]=>
- string(5) "three"
-}
-DONE!
diff --git a/ext/sqlite/tests/sqlite_oo_009.phpt b/ext/sqlite/tests/sqlite_oo_009.phpt
deleted file mode 100755
index c2a55556c1..0000000000
--- a/ext/sqlite/tests/sqlite_oo_009.phpt
+++ /dev/null
@@ -1,43 +0,0 @@
---TEST--
-sqlite-oo: fetch all (unbuffered)
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb_oo.inc";
-
-$data = array(
- "one",
- "two",
- "three"
- );
-
-$db->query("CREATE TABLE strings(a VARCHAR)");
-
-foreach ($data as $str) {
- $db->query("INSERT INTO strings VALUES('$str')");
-}
-
-$r = $db->unbufferedQuery("SELECT a from strings");
-while ($row = $r->fetch(SQLITE_NUM)) {
- var_dump($row);
-}
-echo "DONE!\n";
-?>
---EXPECT--
-array(1) {
- [0]=>
- string(3) "one"
-}
-array(1) {
- [0]=>
- string(3) "two"
-}
-array(1) {
- [0]=>
- string(5) "three"
-}
-DONE!
diff --git a/ext/sqlite/tests/sqlite_oo_010.phpt b/ext/sqlite/tests/sqlite_oo_010.phpt
deleted file mode 100755
index 8d6f3c0a99..0000000000
--- a/ext/sqlite/tests/sqlite_oo_010.phpt
+++ /dev/null
@@ -1,44 +0,0 @@
---TEST--
-sqlite-oo: fetch all (iterator)
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb_oo.inc";
-
-$data = array(
- "one",
- "two",
- "three"
- );
-
-$db->query("CREATE TABLE strings(a VARCHAR)");
-
-foreach ($data as $str) {
- $db->query("INSERT INTO strings VALUES('$str')");
-}
-
-$r = $db->unbufferedQuery("SELECT a from strings", SQLITE_NUM);
-while ($row = $r->valid()) {
- var_dump($r->current());
- $r->next();
-}
-echo "DONE!\n";
-?>
---EXPECT--
-array(1) {
- [0]=>
- string(3) "one"
-}
-array(1) {
- [0]=>
- string(3) "two"
-}
-array(1) {
- [0]=>
- string(5) "three"
-}
-DONE!
diff --git a/ext/sqlite/tests/sqlite_oo_011.phpt b/ext/sqlite/tests/sqlite_oo_011.phpt
deleted file mode 100755
index 4b5a37044c..0000000000
--- a/ext/sqlite/tests/sqlite_oo_011.phpt
+++ /dev/null
@@ -1,33 +0,0 @@
---TEST--
-sqlite-oo: returned associative column names
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb_oo.inc";
-
-$db->query("CREATE TABLE foo (c1 char, c2 char, c3 char)");
-$db->query("CREATE TABLE bar (c1 char, c2 char, c3 char)");
-$db->query("INSERT INTO foo VALUES ('1', '2', '3')");
-$db->query("INSERT INTO bar VALUES ('4', '5', '6')");
-$r = $db->query("SELECT * from foo, bar", SQLITE_ASSOC);
-var_dump($r->fetch());
-?>
---EXPECT--
-array(6) {
- ["foo.c1"]=>
- string(1) "1"
- ["foo.c2"]=>
- string(1) "2"
- ["foo.c3"]=>
- string(1) "3"
- ["bar.c1"]=>
- string(1) "4"
- ["bar.c2"]=>
- string(1) "5"
- ["bar.c3"]=>
- string(1) "6"
-}
diff --git a/ext/sqlite/tests/sqlite_oo_012.phpt b/ext/sqlite/tests/sqlite_oo_012.phpt
deleted file mode 100755
index 408feb9d17..0000000000
--- a/ext/sqlite/tests/sqlite_oo_012.phpt
+++ /dev/null
@@ -1,35 +0,0 @@
---TEST--
-sqlite-oo: read field names
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb_oo.inc";
-
-$db->query("CREATE TABLE strings(foo VARCHAR, bar VARCHAR, baz VARCHAR)");
-
-echo "Buffered\n";
-$r = $db->query("SELECT * from strings");
-for($i=0; $i<$r->numFields(); $i++) {
- var_dump($r->fieldName($i));
-}
-echo "Unbuffered\n";
-$r = $db->unbufferedQuery("SELECT * from strings");
-for($i=0; $i<$r->numFields(); $i++) {
- var_dump($r->fieldName($i));
-}
-echo "DONE!\n";
-?>
---EXPECT--
-Buffered
-string(3) "foo"
-string(3) "bar"
-string(3) "baz"
-Unbuffered
-string(3) "foo"
-string(3) "bar"
-string(3) "baz"
-DONE!
diff --git a/ext/sqlite/tests/sqlite_oo_013.phpt b/ext/sqlite/tests/sqlite_oo_013.phpt
deleted file mode 100755
index 0c19505f23..0000000000
--- a/ext/sqlite/tests/sqlite_oo_013.phpt
+++ /dev/null
@@ -1,75 +0,0 @@
---TEST--
-sqlite-oo: fetch column
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb_oo.inc";
-
-$data = array(
- array (0 => 'one', 1 => 'two'),
- array (0 => 'three', 1 => 'four')
- );
-
-$db->query("CREATE TABLE strings(a VARCHAR, b VARCHAR)");
-
-foreach ($data as $str) {
- $db->query("INSERT INTO strings VALUES('${str[0]}','${str[1]}')");
-}
-
-echo "====BUFFERED====\n";
-$r = $db->query("SELECT a, b from strings");
-while ($r->valid()) {
- var_dump($r->current(SQLITE_NUM));
- var_dump($r->column(0));
- var_dump($r->column(1));
- var_dump($r->column('a'));
- var_dump($r->column('b'));
- $r->next();
-}
-echo "====UNBUFFERED====\n";
-$r = $db->unbufferedQuery("SELECT a, b from strings");
-while ($r->valid()) {
- var_dump($r->column(0));
- var_dump($r->column('b'));
- var_dump($r->column(1));
- var_dump($r->column('a'));
- $r->next();
-}
-echo "DONE!\n";
-?>
---EXPECT--
-====BUFFERED====
-array(2) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
-}
-string(3) "one"
-string(3) "two"
-string(3) "one"
-string(3) "two"
-array(2) {
- [0]=>
- string(5) "three"
- [1]=>
- string(4) "four"
-}
-string(5) "three"
-string(4) "four"
-string(5) "three"
-string(4) "four"
-====UNBUFFERED====
-string(3) "one"
-string(3) "two"
-NULL
-NULL
-string(5) "three"
-string(4) "four"
-NULL
-NULL
-DONE!
diff --git a/ext/sqlite/tests/sqlite_oo_014.phpt b/ext/sqlite/tests/sqlite_oo_014.phpt
deleted file mode 100755
index 9735a5442c..0000000000
--- a/ext/sqlite/tests/sqlite_oo_014.phpt
+++ /dev/null
@@ -1,118 +0,0 @@
---TEST--
-sqlite-oo: fetch all
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb_oo.inc";
-
-$data = array(
- "one",
- "two",
- "three"
- );
-
-$db->query("CREATE TABLE strings(a VARCHAR)");
-
-foreach ($data as $str) {
- $db->query("INSERT INTO strings VALUES('$str')");
-}
-
-echo "unbuffered twice\n";
-$r = $db->unbufferedQuery("SELECT a from strings", SQLITE_NUM);
-var_dump($r->fetchAll());
-var_dump($r->fetchAll());
-
-echo "unbuffered with fetch_array\n";
-$r = $db->unbufferedQuery("SELECT a from strings", SQLITE_NUM);
-var_dump($r->fetch());
-var_dump($r->fetchAll());
-
-echo "buffered\n";
-$r = $db->query("SELECT a from strings", SQLITE_NUM);
-var_dump($r->fetchAll());
-var_dump($r->fetch());
-var_dump($r->fetchAll());
-
-echo "DONE!\n";
-?>
---EXPECTF--
-unbuffered twice
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- string(3) "one"
- }
- [1]=>
- array(1) {
- [0]=>
- string(3) "two"
- }
- [2]=>
- array(1) {
- [0]=>
- string(5) "three"
- }
-}
-
-Warning: SQLiteUnbuffered::fetchAll(): One or more rowsets were already returned; returning NULL this time in %ssqlite_oo_014.php on line %d
-array(0) {
-}
-unbuffered with fetch_array
-array(1) {
- [0]=>
- string(3) "one"
-}
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- string(3) "two"
- }
- [1]=>
- array(1) {
- [0]=>
- string(5) "three"
- }
-}
-buffered
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- string(3) "one"
- }
- [1]=>
- array(1) {
- [0]=>
- string(3) "two"
- }
- [2]=>
- array(1) {
- [0]=>
- string(5) "three"
- }
-}
-bool(false)
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- string(3) "one"
- }
- [1]=>
- array(1) {
- [0]=>
- string(3) "two"
- }
- [2]=>
- array(1) {
- [0]=>
- string(5) "three"
- }
-}
-DONE!
diff --git a/ext/sqlite/tests/sqlite_oo_015.phpt b/ext/sqlite/tests/sqlite_oo_015.phpt
deleted file mode 100755
index 893e6f14ab..0000000000
--- a/ext/sqlite/tests/sqlite_oo_015.phpt
+++ /dev/null
@@ -1,47 +0,0 @@
---TEST--
-sqlite-oo: array_query
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb_oo.inc";
-
-$data = array(
- "one",
- "two",
- "three"
- );
-
-$db->query("CREATE TABLE strings(a VARCHAR)");
-
-foreach ($data as $str) {
- $db->query("INSERT INTO strings VALUES('$str')");
-}
-
-$res = $db->arrayQuery("SELECT a from strings", SQLITE_NUM);
-var_dump($res);
-
-echo "DONE!\n";
-?>
---EXPECTF--
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- string(3) "one"
- }
- [1]=>
- array(1) {
- [0]=>
- string(3) "two"
- }
- [2]=>
- array(1) {
- [0]=>
- string(5) "three"
- }
-}
-DONE!
diff --git a/ext/sqlite/tests/sqlite_oo_016.phpt b/ext/sqlite/tests/sqlite_oo_016.phpt
deleted file mode 100755
index d831b48326..0000000000
--- a/ext/sqlite/tests/sqlite_oo_016.phpt
+++ /dev/null
@@ -1,42 +0,0 @@
---TEST--
-sqlite-oo: fetch single
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb_oo.inc";
-
-$data = array(
- array (0 => 'one', 1 => 'two'),
- array (0 => 'three', 1 => 'four')
- );
-
-$db->query("CREATE TABLE strings(a VARCHAR, b VARCHAR)");
-
-foreach ($data as $str) {
- $db->query("INSERT INTO strings VALUES('${str[0]}','${str[1]}')");
-}
-
-echo "====BUFFERED====\n";
-$r = $db->query("SELECT a, b from strings");
-while ($r->valid()) {
- var_dump($r->fetchSingle());
-}
-echo "====UNBUFFERED====\n";
-$r = $db->unbufferedQuery("SELECT a, b from strings");
-while ($r->valid()) {
- var_dump($r->fetchSingle());
-}
-echo "DONE!\n";
-?>
---EXPECT--
-====BUFFERED====
-string(3) "one"
-string(5) "three"
-====UNBUFFERED====
-string(3) "one"
-string(5) "three"
-DONE!
diff --git a/ext/sqlite/tests/sqlite_oo_020.phpt b/ext/sqlite/tests/sqlite_oo_020.phpt
deleted file mode 100755
index a855101fbd..0000000000
--- a/ext/sqlite/tests/sqlite_oo_020.phpt
+++ /dev/null
@@ -1,66 +0,0 @@
---TEST--
-sqlite-oo: factory and exception
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-$dbname = tempnam(dirname(__FILE__), "phpsql");
-function cleanup() {
- global $db, $dbname;
-
- $db = NULL;
- unlink($dbname);
-}
-register_shutdown_function("cleanup");
-
-try {
- $db = sqlite_factory();
-} catch(SQLiteException $err) {
- echo "Message: ".$err->getMessage()."\n";
- echo "File: ".$err->getFile()."\n";
- //echo "Line: ".$err->getLine()."\n";
- //print_r($err->getTrace());
- //echo "BackTrace: ".$err->getTraceAsString()."\n";
-}
-
-$db = sqlite_factory($dbname);
-
-$data = array(
- array (0 => 'one', 1 => 'two'),
- array (0 => 'three', 1 => 'four')
- );
-
-$db->query("CREATE TABLE strings(a VARCHAR, b VARCHAR)");
-
-foreach ($data as $str) {
- $db->query("INSERT INTO strings VALUES('${str[0]}','${str[1]}')");
-}
-
-$r = $db->unbufferedQuery("SELECT a, b from strings");
-while ($r->valid()) {
- var_dump($r->current(SQLITE_NUM));
- $r->next();
-}
-$r = null;
-$db = null;
-echo "DONE!\n";
-?>
---EXPECTF--
-Message: sqlite_factory() expects at least 1 parameter, 0 given
-File: %ssqlite_oo_020.php
-array(2) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
-}
-array(2) {
- [0]=>
- string(5) "three"
- [1]=>
- string(4) "four"
-}
-DONE!
diff --git a/ext/sqlite/tests/sqlite_oo_021.phpt b/ext/sqlite/tests/sqlite_oo_021.phpt
deleted file mode 100755
index 850e4dc9a3..0000000000
--- a/ext/sqlite/tests/sqlite_oo_021.phpt
+++ /dev/null
@@ -1,48 +0,0 @@
---TEST--
-sqlite-oo: single query
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb_oo.inc";
-
-$db->query("CREATE TABLE test_db ( id INTEGER PRIMARY KEY, data VARCHAR(100) )");
-for ($i = 0; $i < 10; $i++) {
- $db->query("INSERT INTO test_db (data) VALUES('{$i}data')");
-}
-$db->query("INSERT INTO test_db (data) VALUES(NULL)");
-
-var_dump($db->singleQuery("SELECT id FROM test_db WHERE id=5"));
-var_dump($db->singleQuery("SELECT * FROM test_db WHERE id=4"));
-var_dump($db->singleQuery("SELECT data FROM test_db WHERE id=6"));
-var_dump($db->singleQuery("SELECT * FROM test_db WHERE id < 5"));
-var_dump($db->singleQuery("SELECT * FROM test db WHERE id < 4"));
-var_dump($db->singleQuery("SELECT * FROM test_db WHERE id=999999"));
-var_dump($db->singleQuery("SELECT id FROM test_db WHERE id=5", FALSE));
-
-echo "DONE!\n";
-?>
---EXPECTF--
-string(1) "5"
-string(1) "4"
-string(5) "5data"
-array(4) {
- [0]=>
- string(1) "1"
- [1]=>
- string(1) "2"
- [2]=>
- string(1) "3"
- [3]=>
- string(1) "4"
-}
-
-Warning: SQLiteDatabase::singleQuery(): no such table: test in %s on line %d
-bool(false)
-NULL
-array(1) {
- [0]=>
- string(1) "5"
-}
-DONE!
diff --git a/ext/sqlite/tests/sqlite_oo_022.phpt b/ext/sqlite/tests/sqlite_oo_022.phpt
deleted file mode 100755
index 988904f774..0000000000
--- a/ext/sqlite/tests/sqlite_oo_022.phpt
+++ /dev/null
@@ -1,98 +0,0 @@
---TEST--
-sqlite-oo: sqlite::seek
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb_oo.inc";
-
-$data = array(
- "one",
- "two",
- "three"
- );
-
-$db->query("CREATE TABLE strings(a)");
-
-foreach ($data as $str) {
- $db->query("INSERT INTO strings VALUES('$str')");
-}
-
-$res = $db->query("SELECT a FROM strings", SQLITE_NUM);
-for ($idx = -1; $idx < 4; $idx++) {
- echo "====SEEK:$idx====\n";
- $res->seek($idx);
- var_dump($res->current());
-}
-echo "====AGAIN====\n";
-for ($idx = -1; $idx < 4; $idx++) {
- echo "====SEEK:$idx====\n";
- $res->seek($idx);
- var_dump($res->current());
-}
-echo "====DONE!====\n";
-?>
---EXPECTF--
-====SEEK:-1====
-
-Warning: SQLiteResult::seek(): row -1 out of range in %ssqlite_oo_022.php on line %d
-array(1) {
- [0]=>
- string(3) "one"
-}
-====SEEK:0====
-array(1) {
- [0]=>
- string(3) "one"
-}
-====SEEK:1====
-array(1) {
- [0]=>
- string(3) "two"
-}
-====SEEK:2====
-array(1) {
- [0]=>
- string(5) "three"
-}
-====SEEK:3====
-
-Warning: SQLiteResult::seek(): row 3 out of range in %ssqlite_oo_022.php on line %d
-array(1) {
- [0]=>
- string(5) "three"
-}
-====AGAIN====
-====SEEK:-1====
-
-Warning: SQLiteResult::seek(): row -1 out of range in %ssqlite_oo_022.php on line %d
-array(1) {
- [0]=>
- string(5) "three"
-}
-====SEEK:0====
-array(1) {
- [0]=>
- string(3) "one"
-}
-====SEEK:1====
-array(1) {
- [0]=>
- string(3) "two"
-}
-====SEEK:2====
-array(1) {
- [0]=>
- string(5) "three"
-}
-====SEEK:3====
-
-Warning: SQLiteResult::seek(): row 3 out of range in %ssqlite_oo_022.php on line %d
-array(1) {
- [0]=>
- string(5) "three"
-}
-====DONE!====
diff --git a/ext/sqlite/tests/sqlite_oo_024.phpt b/ext/sqlite/tests/sqlite_oo_024.phpt
deleted file mode 100755
index f974ad8a8d..0000000000
--- a/ext/sqlite/tests/sqlite_oo_024.phpt
+++ /dev/null
@@ -1,74 +0,0 @@
---TEST--
-sqlite-oo: sqlite::fetch_object
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb_oo.inc";
-
-class class24 {
- function __construct() {
- echo __METHOD__ . "\n";
- }
-}
-
-$data = array(
- "one",
- "two",
- "three"
- );
-
-$db->query("CREATE TABLE strings(a)");
-
-foreach ($data as $str) {
- $db->query("INSERT INTO strings VALUES('$str')");
-}
-
-echo "====class24====\n";
-$res = $db->query("SELECT a FROM strings", SQLITE_ASSOC);
-while ($res->valid()) {
- var_dump($res->fetchObject('class24'));
-}
-
-echo "====stdclass====\n";
-$res = $db->query("SELECT a FROM strings", SQLITE_ASSOC);
-while ($res->valid()) {
- var_dump($res->fetchObject());
-}
-
-echo "====DONE!====\n";
-?>
---EXPECTF--
-====class24====
-class24::__construct
-object(class24)#%d (1) {
- ["a"]=>
- string(3) "one"
-}
-class24::__construct
-object(class24)#%d (1) {
- ["a"]=>
- string(3) "two"
-}
-class24::__construct
-object(class24)#%d (1) {
- ["a"]=>
- string(5) "three"
-}
-====stdclass====
-object(stdClass)#%d (1) {
- ["a"]=>
- string(3) "one"
-}
-object(stdClass)#%d (1) {
- ["a"]=>
- string(3) "two"
-}
-object(stdClass)#%d (1) {
- ["a"]=>
- string(5) "three"
-}
-====DONE!====
diff --git a/ext/sqlite/tests/sqlite_oo_025.phpt b/ext/sqlite/tests/sqlite_oo_025.phpt
deleted file mode 100755
index 3cb42d7647..0000000000
--- a/ext/sqlite/tests/sqlite_oo_025.phpt
+++ /dev/null
@@ -1,103 +0,0 @@
---TEST--
-sqlite-oo: sqlite / foreach
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip";
-?>
---FILE--
-<?php
-include "blankdb_oo.inc";
-
-$data = array(
- "one",
- "two",
- "three"
- );
-
-$db->query("CREATE TABLE strings(a VARCHAR)");
-
-foreach ($data as $str) {
- $db->query("INSERT INTO strings VALUES('$str')");
-}
-
-echo "====UNBUFFERED====\n";
-$r = $db->unbufferedQuery("SELECT a from strings", SQLITE_NUM);
-//var_dump(class_implements($r));
-foreach($r as $row) {
- var_dump($row);
-}
-echo "====NO-MORE====\n";
-foreach($r as $row) {
- var_dump($row);
-}
-echo "====DIRECT====\n";
-foreach($db->unbufferedQuery("SELECT a from strings", SQLITE_NUM) as $row) {
- var_dump($row);
-}
-echo "====BUFFERED====\n";
-$r = $db->query("SELECT a from strings", SQLITE_NUM);
-//var_dump(class_implements($r));
-foreach($r as $row) {
- var_dump($row);
-}
-foreach($r as $row) {
- var_dump($row);
-}
-echo "DONE!\n";
-?>
---EXPECT--
-====UNBUFFERED====
-array(1) {
- [0]=>
- string(3) "one"
-}
-array(1) {
- [0]=>
- string(3) "two"
-}
-array(1) {
- [0]=>
- string(5) "three"
-}
-====NO-MORE====
-====DIRECT====
-array(1) {
- [0]=>
- string(3) "one"
-}
-array(1) {
- [0]=>
- string(3) "two"
-}
-array(1) {
- [0]=>
- string(5) "three"
-}
-====BUFFERED====
-array(1) {
- [0]=>
- string(3) "one"
-}
-array(1) {
- [0]=>
- string(3) "two"
-}
-array(1) {
- [0]=>
- string(5) "three"
-}
-array(1) {
- [0]=>
- string(3) "one"
-}
-array(1) {
- [0]=>
- string(3) "two"
-}
-array(1) {
- [0]=>
- string(5) "three"
-}
-DONE!
diff --git a/ext/sqlite/tests/sqlite_oo_026.phpt b/ext/sqlite/tests/sqlite_oo_026.phpt
deleted file mode 100755
index 4beacbb888..0000000000
--- a/ext/sqlite/tests/sqlite_oo_026.phpt
+++ /dev/null
@@ -1,56 +0,0 @@
---TEST--
-sqlite-oo: unbuffered
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip";
-?>
---FILE--
-<?php
-include "blankdb_oo.inc";
-
-$data = array(
- "one",
- "two",
- "three"
- );
-
-$db->query("CREATE TABLE strings(a VARCHAR)");
-
-foreach ($data as $str) {
- $db->query("INSERT INTO strings VALUES('$str')");
-}
-
-echo "====FOREACH====\n";
-$r = $db->unbufferedQuery("SELECT a from strings", SQLITE_NUM);
-foreach($r as $idx => $row) {
- var_dump($row[0]);
- var_dump($row[0]);
-}
-echo "====FOR====\n";
-$r = $db->unbufferedQuery("SELECT a from strings", SQLITE_NUM);
-for(;$r->valid(); $r->next()) {
- $v = $r->column(0);
- var_dump($v);
- $c = $r->column(0);
- var_dump(is_null($c) || $c==$v);
-}
-echo "===DONE===\n";
-?>
---EXPECT--
-====FOREACH====
-string(3) "one"
-string(3) "one"
-string(3) "two"
-string(3) "two"
-string(5) "three"
-string(5) "three"
-====FOR====
-string(3) "one"
-bool(true)
-string(3) "two"
-bool(true)
-string(5) "three"
-bool(true)
-===DONE===
diff --git a/ext/sqlite/tests/sqlite_oo_027.phpt b/ext/sqlite/tests/sqlite_oo_027.phpt
deleted file mode 100755
index 069c7c97ea..0000000000
--- a/ext/sqlite/tests/sqlite_oo_027.phpt
+++ /dev/null
@@ -1,42 +0,0 @@
---TEST--
-sqlite-oo: changes
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip";
-?>
---FILE--
-<?php
-include "blankdb_oo.inc";
-
-$data = array("one", "two", "three");
-
-$db->query("CREATE TABLE strings(a VARCHAR)");
-
-foreach ($data as $str) {
- $db->query("INSERT INTO strings VALUES('$str')");
- echo $db->changes() . "\n";
-}
-
-$db->query("UPDATE strings SET a='foo' WHERE a!='two'");
-echo $db->changes() . "\n";
-
-$db->query("DELETE FROM strings WHERE 1");
-echo $db->changes() . "\n";
-
-$str = '';
-foreach ($data as $s) {
- $str .= "INSERT INTO strings VALUES('".$s."');";
-}
-$db->query($str);
-echo $db->changes() . "\n";
-
-?>
---EXPECT--
-1
-1
-1
-2
-3
-3
diff --git a/ext/sqlite/tests/sqlite_oo_028.phpt b/ext/sqlite/tests/sqlite_oo_028.phpt
deleted file mode 100755
index fe7f8c6f68..0000000000
--- a/ext/sqlite/tests/sqlite_oo_028.phpt
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-sqlite-oo: sqlite_fetch_column_types
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-include "blankdb_oo.inc";
-
-$db->query("CREATE TABLE strings(a, b INTEGER, c VARCHAR(10), d)");
-$db->query("INSERT INTO strings VALUES('1', '2', '3', 'abc')");
-
-var_dump($db->fetchColumnTypes("strings"));
-?>
---EXPECT--
-array(4) {
- ["a"]=>
- string(0) ""
- ["b"]=>
- string(7) "INTEGER"
- ["c"]=>
- string(11) "VARCHAR(10)"
- ["d"]=>
- string(0) ""
-}
diff --git a/ext/sqlite/tests/sqlite_oo_029.phpt b/ext/sqlite/tests/sqlite_oo_029.phpt
deleted file mode 100755
index 4b2b1992b8..0000000000
--- a/ext/sqlite/tests/sqlite_oo_029.phpt
+++ /dev/null
@@ -1,53 +0,0 @@
---TEST--
-sqlite-oo: call method with $this
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip";
-?>
---FILE--
-<?php
-include "blankdb_oo.inc";
-
-$db->query("CREATE TABLE strings(key VARCHAR(10), var VARCHAR(10))");
-$db->query("INSERT INTO strings VALUES('foo', 'foo')");
-
-class sqlite_help
-{
- function __construct($db){
- $this->db = $db;
- $this->db->createFunction('link_keywords', array(&$this, 'linkers'), 1);
- }
-
- function getSingle($key)
- {
- return $this->db->singleQuery('SELECT link_keywords(var) FROM strings WHERE key=\''.$key.'\'', 1);
- }
-
- function linkers($str)
- {
- $str = str_replace('foo', 'bar', $str);
- return $str;
- }
-
- function free()
- {
- unset($this->db);
- }
-
- function __destruct()
- {
- echo "DESTRUCTED\n";
- }
-}
-
-$obj = new sqlite_help($db);
-echo $obj->getSingle('foo')."\n";
-$obj->free();
-unset($obj);
-
-?>
-===DONE===
---EXPECT--
-bar
-===DONE===
-DESTRUCTED
diff --git a/ext/sqlite/tests/sqlite_oo_030.phpt b/ext/sqlite/tests/sqlite_oo_030.phpt
deleted file mode 100755
index 95b91f61fc..0000000000
--- a/ext/sqlite/tests/sqlite_oo_030.phpt
+++ /dev/null
@@ -1,44 +0,0 @@
---TEST--
-sqlite-oo: calling static methods
---INI--
-sqlite.assoc_case=0
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip";
-?>
---FILE--
-<?php
-
-require_once('blankdb_oo.inc');
-
-class foo {
- static function bar($param = NULL) {
- return $param;
- }
-}
-
-function baz($param = NULL) {
- return $param;
-}
-
-var_dump($db->singleQuery("select php('baz')", 1));
-var_dump($db->singleQuery("select php('baz', 1)", 1));
-var_dump($db->singleQuery("select php('baz', \"PHP\")", 1));
-var_dump($db->singleQuery("select php('foo::bar')", 1));
-var_dump($db->singleQuery("select php('foo::bar', 1)", 1));
-var_dump($db->singleQuery("select php('foo::bar', \"PHP\")", 1));
-var_dump($db->singleQuery("select php('foo::bar(\"PHP\")')", 1));
-
-?>
-===DONE===
---EXPECTF--
-NULL
-string(1) "1"
-string(3) "PHP"
-NULL
-string(1) "1"
-string(3) "PHP"
-
-Warning: SQLiteDatabase::singleQuery(): function `foo::bar("PHP")' is not a function name in %ssqlite_oo_030.php on line %d
-bool(false)
-===DONE===
diff --git a/ext/sqlite/tests/sqlite_popen_basic.phpt b/ext/sqlite/tests/sqlite_popen_basic.phpt
deleted file mode 100644
index a3beaa10c8..0000000000
--- a/ext/sqlite/tests/sqlite_popen_basic.phpt
+++ /dev/null
@@ -1,27 +0,0 @@
---TEST--
-SQLite: sqlite_popen() basic tests
---SKIPIF--
-<?php if (!extension_loaded("sqlite")) print "skip"; ?>
---FILE--
-<?php
-/* Prototype : resource sqlite_popen(string filename [, int mode [, string &error_message]])
- * Description: Opens a persistent handle to a SQLite database. Will create the database if it does not exist.
- * Source code: ext/sqlite/sqlite.c
- * Alias to functions:
-*/
-
- $db1 = sqlite_popen(":memory:");
- $db2 = sqlite_popen(":memory:");
-
- var_dump($db1);
- var_dump($db2);
-
- list($resourceId1) = sscanf((string) $db1, "resource(%d) of type (sqlite database (persistent))");
- list($resourceId2) = sscanf((string) $db2, "resource(%d) of type (sqlite database (persistent))");
-
- var_dump($resourceId1 === $resourceId2);
-?>
---EXPECTF--
-resource(%d) of type (sqlite database (persistent))
-resource(%d) of type (sqlite database (persistent))
-bool(true)
diff --git a/ext/sqlite/tests/sqlite_popen_error.phpt b/ext/sqlite/tests/sqlite_popen_error.phpt
deleted file mode 100644
index aefb678c20..0000000000
--- a/ext/sqlite/tests/sqlite_popen_error.phpt
+++ /dev/null
@@ -1,34 +0,0 @@
---TEST--
-Test sqlite_popen() function : error conditions
---SKIPIF--
-<?php if (!extension_loaded("sqlite")) print "skip sqlite extension not loaded"; ?>
---FILE--
-<?php
-/* Prototype : resource sqlite_popen(string filename [, int mode [, string &error_message]])
- * Description: Opens a persistent handle to a SQLite database. Will create the database if it does not exist.
- * Source code: ext/sqlite/sqlite.c
- * Alias to functions:
- */
-
-$message = '';
-
-echo "*** Testing sqlite_popen() : error conditions ***\n";
-
-var_dump( sqlite_popen() );
-var_dump( sqlite_popen(":memory:", 0666, $message, 'foobar') );
-var_dump( sqlite_popen("", 0666, $message) );
-var_dump( $message );
-
-?>
-===DONE===
---EXPECTF--
-*** Testing sqlite_popen() : error conditions ***
-
-Warning: sqlite_popen() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: sqlite_popen() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-bool(false)
-NULL
-===DONE===
diff --git a/ext/sqlite/tests/sqlite_session_001.phpt b/ext/sqlite/tests/sqlite_session_001.phpt
deleted file mode 100644
index 2fb2007c32..0000000000
--- a/ext/sqlite/tests/sqlite_session_001.phpt
+++ /dev/null
@@ -1,46 +0,0 @@
---TEST--
-sqlite, session storage test
---CREDITS--
-Mats Lindh <mats at lindh.no>
-#Testfest php.no
---INI--
-session.save_handler = sqlite
---SKIPIF--
-if (!extension_loaded("session"))
-{
- die("skip Session module not loaded");
-}
-if (!extension_loaded("sqlite"))
-{
- die("skip Session module not loaded");
-}
---FILE--
-<?php
-/* Description: Tests that sqlite can be used as a session save handler
-* Source code: ext/sqlite/sess_sqlite.c
-*/
-
-ob_start();
-session_save_path(__DIR__ . "/sessiondb.sdb");
-
-// create the session and set a session value
-session_start();
-$_SESSION["test"] = "foo_bar";
-
-// close the session and unset the value
-session_write_close();
-unset($_SESSION["test"]);
-var_dump(isset($_SESSION["test"]));
-
-// start the session again and check that we have the proper value
-session_start();
-var_dump($_SESSION["test"]);
-ob_end_flush();
-?>
---EXPECTF--
-bool(false)
-%unicode|string%(7) "foo_bar"
---CLEAN--
-<?php
- unlink(__DIR__ . "/sessiondb.sdb")
-?>
diff --git a/ext/sqlite/tests/sqlite_session_002.phpt b/ext/sqlite/tests/sqlite_session_002.phpt
deleted file mode 100644
index 546ba1cd14..0000000000
--- a/ext/sqlite/tests/sqlite_session_002.phpt
+++ /dev/null
@@ -1,54 +0,0 @@
---TEST--
-sqlite, session destroy test
---CREDITS--
-Mats Lindh <mats at lindh.no>
-#Testfest php.no
---INI--
-session.save_handler = sqlite
---SKIPIF--
-if (!extension_loaded("session"))
-{
- die("skip Session module not loaded");
-}
-if (!extension_loaded("sqlite"))
-{
- die("skip sqlite module not loaded");
-}
---FILE--
-<?php
-/* Description: Tests that sqlite will destroy a session when used as a session handler
-* Source code: ext/sqlite/sess_sqlite.c
-*/
-ob_start();
-session_save_path(__DIR__ . "/sessiondb.sdb");
-
-// start a session and save a value to it before commiting the session to the database
-session_start();
-$_SESSION["test"] = "foo_bar";
-session_write_close();
-
-// remove the session value
-unset($_SESSION["test"]);
-var_dump(isset($_SESSION["test"]));
-
-// start the session again and destroy it
-session_start();
-var_dump($_SESSION["test"]);
-session_destroy();
-session_write_close();
-
-unset($_SESSION["test"]);
-
-// check that the session has been destroyed
-session_start();
-var_dump(isset($_SESSION["test"]));
-ob_end_flush();
-?>
---EXPECTF--
-bool(false)
-%unicode|string%(7) "foo_bar"
-bool(false)
---CLEAN--
-<?php
- unlink(__DIR__ . "/sessiondb.sdb")
-?>
diff --git a/ext/sqlite/tests/sqlite_spl_001.phpt b/ext/sqlite/tests/sqlite_spl_001.phpt
deleted file mode 100755
index 2a1a2b49c4..0000000000
--- a/ext/sqlite/tests/sqlite_spl_001.phpt
+++ /dev/null
@@ -1,125 +0,0 @@
---TEST--
-sqlite-spl: Iteration
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip";
-if (!extension_loaded("spl")) print "skip SPL is not present";
-?>
---FILE--
-<?php
-include "blankdb_oo.inc";
-
-$db->query("CREATE TABLE menu(id_l int PRIMARY KEY, id_r int UNIQUE, key VARCHAR(10))");
-$db->query("INSERT INTO menu VALUES( 1, 12, 'A')");
-$db->query("INSERT INTO menu VALUES( 2, 9, 'B')");
-$db->query("INSERT INTO menu VALUES(10, 11, 'F')");
-$db->query("INSERT INTO menu VALUES( 3, 6, 'C')");
-$db->query("INSERT INTO menu VALUES( 7, 8, 'E')");
-$db->query("INSERT INTO menu VALUES( 4, 5, 'D')");
-
-class SqliteNestedsetElement
-{
- protected $id_l;
- protected $id_r;
- protected $key;
-
- function __construct($db)
- {
- $this->db = $db;
- }
-
- function getLeft()
- {
- return $this->id_l;
- }
-
- function getRight()
- {
- return $this->id_r;
- }
-
- function __toString()
- {
- return $this->key;
- }
-
- function key()
- {
- return $this->key;
- }
-}
-
-class SqliteNestedset implements RecursiveIterator
-{
- protected $id;
- protected $id_l;
- protected $id_r;
- protected $entry;
-
- function __construct($db, $id_l = 1)
- {
- $this->db = $db;
- $this->id_l = $id_l;
- $this->id_r = $this->db->singleQuery('SELECT id_r FROM menu WHERE id_l='.$id_l, 1);
- $this->id = $id_l;
- }
-
- function rewind()
- {
- $this->id = $this->id_l;
- $this->fetch();
- }
-
- function valid()
- {
- return is_object($this->entry);
- }
-
- function current()
- {
- return $this->entry->__toString();
- }
-
- function key()
- {
- return $this->entry->key();;
- }
-
- function next()
- {
- $this->id = $this->entry->getRight() + 1;
- $this->fetch();
- }
-
- protected function fetch()
- {
- $res = $this->db->unbufferedQuery('SELECT * FROM menu WHERE id_l='.$this->id);
- $this->entry = $res->fetchObject('SqliteNestedsetElement', array(&$this->db));
- unset($res);
- }
-
- function hasChildren()
- {
- return $this->entry->getLeft() + 1 < $this->entry->getRight();
- }
-
- function getChildren()
- {
- return new SqliteNestedset($this->db, $this->entry->getLeft() + 1, $this->entry->getRight() - 1);
- }
-}
-
-$menu_iterator = new RecursiveIteratorIterator(new SqliteNestedset($db), RecursiveIteratorIterator::SELF_FIRST);
-foreach($menu_iterator as $entry) {
- echo $menu_iterator->getDepth() . $entry . "\n";
-}
-?>
-===DONE===
---EXPECT--
-0A
-1B
-2C
-3D
-2E
-1F
-===DONE===
diff --git a/ext/sqlite/tests/sqlite_spl_002.phpt b/ext/sqlite/tests/sqlite_spl_002.phpt
deleted file mode 100755
index c60ca01e02..0000000000
--- a/ext/sqlite/tests/sqlite_spl_002.phpt
+++ /dev/null
@@ -1,29 +0,0 @@
---TEST--
-sqlite-spl: Countable
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip";
-if (!extension_loaded("spl")) print "skip SPL is not present";
-?>
---FILE--
-<?php
-include "blankdb_oo.inc";
-
-$db->query("CREATE TABLE menu(id_l int PRIMARY KEY, id_r int UNIQUE, key VARCHAR(10))");
-$db->query("INSERT INTO menu VALUES( 1, 12, 'A')");
-$db->query("INSERT INTO menu VALUES( 2, 9, 'B')");
-$db->query("INSERT INTO menu VALUES(10, 11, 'F')");
-$db->query("INSERT INTO menu VALUES( 3, 6, 'C')");
-$db->query("INSERT INTO menu VALUES( 7, 8, 'E')");
-$db->query("INSERT INTO menu VALUES( 4, 5, 'D')");
-
-$res = $db->query("SELECT * from menu");
-
-var_dump($res->count());
-var_dump(count($res));
-?>
-===DONE===
---EXPECT--
-int(6)
-int(6)
-===DONE===
diff --git a/ext/sqlite/tests/sqlite_spl_003.phpt b/ext/sqlite/tests/sqlite_spl_003.phpt
deleted file mode 100755
index 267ceff50c..0000000000
--- a/ext/sqlite/tests/sqlite_spl_003.phpt
+++ /dev/null
@@ -1,28 +0,0 @@
---TEST--
-sqlite-spl: Exception
---SKIPIF--
-<?php # vim:ft=php
-if (!extension_loaded("sqlite")) print "skip";
-if (!extension_loaded("spl")) print "skip SPL is not present";
-?>
---FILE--
-<?php
-
-try
-{
- $db = sqlite_factory();
-}
-catch(SQLiteException $e)
-{
- $parents = class_parents($e);
- if (array_key_exists('RuntimeException', $parents))
- {
- echo "GOOD\n";
- }
-}
-
-?>
-===DONE===
---EXPECT--
-GOOD
-===DONE===
diff --git a/ext/sqlite/tests/sqlitedatabase_arrayquery.phpt b/ext/sqlite/tests/sqlitedatabase_arrayquery.phpt
deleted file mode 100644
index 1e3084cebe..0000000000
--- a/ext/sqlite/tests/sqlitedatabase_arrayquery.phpt
+++ /dev/null
@@ -1,23 +0,0 @@
---TEST--
-Testing SQLiteDatabase::ArrayQuery with NULL-byte string
---SKIPIF--
-<?php
-if (!extension_loaded("sqlite")) print "skip";
-?>
---FILE--
-<?php
-
-$method = new ReflectionMethod('sqlitedatabase::arrayquery');
-
-$class = $method->getDeclaringClass()->newInstanceArgs(array(':memory:'));
-
-$p = "\0";
-
-$method->invokeArgs($class, array_fill(0, 2, $p));
-$method->invokeArgs($class, array_fill(0, 1, $p));
-
-?>
---EXPECTF--
-Warning: SQLiteDatabase::arrayQuery() expects parameter 2 to be long, string given in %s on line %d
-
-Warning: SQLiteDatabase::arrayQuery(): Cannot execute empty query. in %s on line %d