summaryrefslogtreecommitdiff
path: root/ext/sqlite/tests
diff options
context:
space:
mode:
authorSVN Migration <svn@php.net>2004-01-25 12:03:25 +0000
committerSVN Migration <svn@php.net>2004-01-25 12:03:25 +0000
commit22476b36ce621bdd115493bab84cbe706e422a7c (patch)
tree1124d1c5af68860a78c2252bb0dac63c9f18156e /ext/sqlite/tests
parenteb7aca4ea896b09cb9afc2466a46f4720acc4a4e (diff)
downloadphp-git-php_ibase_before_split.tar.gz
This commit was manufactured by cvs2svn to create tagphp_ibase_before_split
'php_ibase_before_split'.
Diffstat (limited to 'ext/sqlite/tests')
-rw-r--r--ext/sqlite/tests/blankdb.inc17
-rwxr-xr-xext/sqlite/tests/blankdb_oo.inc11
-rw-r--r--ext/sqlite/tests/bug26911.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_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.phpt63
-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
-rwxr-xr-xext/sqlite/tests/sqlite_oo_031.phpt125
50 files changed, 0 insertions, 2644 deletions
diff --git a/ext/sqlite/tests/blankdb.inc b/ext/sqlite/tests/blankdb.inc
deleted file mode 100644
index 43c6ff3582..0000000000
--- a/ext/sqlite/tests/blankdb.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-<?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);
-?>
diff --git a/ext/sqlite/tests/blankdb_oo.inc b/ext/sqlite/tests/blankdb_oo.inc
deleted file mode 100755
index 04decbe83e..0000000000
--- a/ext/sqlite/tests/blankdb_oo.inc
+++ /dev/null
@@ -1,11 +0,0 @@
-<?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 sqlite_db($dbname);
-?>
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/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 9f696067b5..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_has_more($r)) {
- var_dump(sqlite_current($r, SQLITE_NUM));
- sqlite_next($r);
-}
-$r = sqlite_query("SELECT a from strings", $db);
-while (sqlite_has_more($r)) {
- var_dump(sqlite_current($r, SQLITE_NUM));
- sqlite_next($r);
-}
-sqlite_rewind($r);
-while (sqlite_has_more($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 2a5e44ccf3..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_has_more($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_has_more($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 4ad96c475f..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"
- }
-}
-
-Notice: sqlite_fetch_all(): One or more rowsets were already returned 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 6f9a9c327c..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_has_more($r)) {
- var_dump(sqlite_fetch_single($r));
-}
-echo "====UNBUFFERED====\n";
-$r = sqlite_unbuffered_query("SELECT a, b from strings", $db);
-while (sqlite_has_more($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 3f175104d6..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_has_more($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_has_more($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 bf3dfc2a1a..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_has_more($res)) {
- var_dump(sqlite_fetch_object($res, 'class24'));
-}
-
-echo "====stdclass====\n";
-$res = sqlite_query($db, "SELECT a FROM strings", SQLITE_ASSOC);
-while (sqlite_has_more($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_oo_001.phpt b/ext/sqlite/tests/sqlite_oo_001.phpt
deleted file mode 100755
index 38865160f7..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(sqlite_db)#%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 d3289b4d87..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_array());
-?>
---EXPECTF--
-object(sqlite_db)#%d (0) {
-}
-object(sqlite_query)#%d (0) {
-}
-object(sqlite_query)#%d (0) {
-}
-object(sqlite_query)#%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 f498038936..0000000000
--- a/ext/sqlite/tests/sqlite_oo_003.phpt
+++ /dev/null
@@ -1,51 +0,0 @@
---TEST--
-sqlite-oo: Simple insert/select, different result represenatation
---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_array(SQLITE_BOTH));
-$r = $db->query("SELECT * from foo");
-var_dump($r->fetch_array(SQLITE_NUM));
-$r = $db->query("SELECT * from foo");
-var_dump($r->fetch_array(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 4340fb6e3a..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_array(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 184804cfc9..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->unbuffered_query("SELECT a from strings");
-while ($row = $r->fetch_array(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 c27d538d7d..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->unbuffered_query("SELECT a from strings", SQLITE_NUM);
-while ($row = $r->hasMore()) {
- 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 ae6c445a4f..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_array());
-?>
---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 b1a26440c8..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->num_fields(); $i++) {
- var_dump($r->field_name($i));
-}
-echo "Unbuffered\n";
-$r = $db->unbuffered_query("SELECT * from strings");
-for($i=0; $i<$r->num_fields(); $i++) {
- var_dump($r->field_name($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 3aedecc6a8..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->hasMore()) {
- 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->unbuffered_query("SELECT a, b from strings");
-while ($r->hasMore()) {
- 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 918dfee3e0..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->unbuffered_query("SELECT a from strings", SQLITE_NUM);
-var_dump($r->fetch_all());
-var_dump($r->fetch_all());
-
-echo "unbuffered with fetch_array\n";
-$r = $db->unbuffered_query("SELECT a from strings", SQLITE_NUM);
-var_dump($r->fetch_array());
-var_dump($r->fetch_all());
-
-echo "buffered\n";
-$r = $db->query("SELECT a from strings", SQLITE_NUM);
-var_dump($r->fetch_all());
-var_dump($r->fetch_array());
-var_dump($r->fetch_all());
-
-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"
- }
-}
-
-Notice: sqlite_ub_query::fetch_all(): One or more rowsets were already returned 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 5fc90e2c8c..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->array_query("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 a9b3e2760e..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->hasMore()) {
- var_dump($r->fetch_single());
-}
-echo "====UNBUFFERED====\n";
-$r = $db->unbuffered_query("SELECT a, b from strings");
-while ($r->hasMore()) {
- var_dump($r->fetch_single());
-}
-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 49adaea8b1..0000000000
--- a/ext/sqlite/tests/sqlite_oo_020.phpt
+++ /dev/null
@@ -1,63 +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(sqlite_exception $err) {
- echo "Message: ".$err->getMessage()."\n";
- echo "File: ".$err->getFile()."\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->unbuffered_query("SELECT a, b from strings");
-while ($r->hasMore()) {
- 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 22ae724b89..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->single_query("SELECT id FROM test_db WHERE id=5"));
-var_dump($db->single_query("SELECT * FROM test_db WHERE id=4"));
-var_dump($db->single_query("SELECT data FROM test_db WHERE id=6"));
-var_dump($db->single_query("SELECT * FROM test_db WHERE id < 5"));
-var_dump($db->single_query("SELECT * FROM test db WHERE id < 4"));
-var_dump($db->single_query("SELECT * FROM test_db WHERE id=999999"));
-var_dump($db->single_query("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: sqlite_db::single_query(): 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 7f4e2cdbcc..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: sqlite_query::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: sqlite_query::seek(): row 3 out of range in %ssqlite_oo_022.php on line %d
-array(1) {
- [0]=>
- string(5) "three"
-}
-====AGAIN====
-====SEEK:-1====
-
-Warning: sqlite_query::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: sqlite_query::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 f1f89d9acc..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->hasMore()) {
- var_dump($res->fetch_object('class24'));
-}
-
-echo "====stdclass====\n";
-$res = $db->query("SELECT a FROM strings", SQLITE_ASSOC);
-while ($res->hasMore()) {
- var_dump($res->fetch_object());
-}
-
-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 b5680a78cd..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->unbuffered_query("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->unbuffered_query("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 f9e2503b76..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->unbuffered_query("SELECT a from strings", SQLITE_NUM);
-foreach($r as $idx => $row) {
- var_dump($row[0]);
- var_dump($row[0]);
-}
-echo "====FOR====\n";
-$r = $db->unbuffered_query("SELECT a from strings", SQLITE_NUM);
-for(;$r->hasMore(); $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 be59496ce1..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->fetch_column_types("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 e86efc9187..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 sqlite_help($db){
- $this->db = $db;
- $this->db->create_function('link_keywords', array(&$this, 'linkers'), 1);
- }
-
- function get_single($key)
- {
- return $this->db->single_query('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->get_single('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 3f3869baa2..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->single_query("select php('baz')", 1));
-var_dump($db->single_query("select php('baz', 1)", 1));
-var_dump($db->single_query("select php('baz', \"PHP\")", 1));
-var_dump($db->single_query("select php('foo::bar')", 1));
-var_dump($db->single_query("select php('foo::bar', 1)", 1));
-var_dump($db->single_query("select php('foo::bar', \"PHP\")", 1));
-var_dump($db->single_query("select php('foo::bar(\"PHP\")')", 1));
-
-?>
-===DONE===
---EXPECTF--
-NULL
-string(1) "1"
-string(3) "PHP"
-NULL
-string(1) "1"
-string(3) "PHP"
-
-Warning: sqlite_db::single_query(): call_user_function_ex failed for function foo::bar("PHP")() in %ssqlite_oo_030.php on line %d
-bool(false)
-===DONE===
diff --git a/ext/sqlite/tests/sqlite_oo_031.phpt b/ext/sqlite/tests/sqlite_oo_031.phpt
deleted file mode 100755
index 84e6861654..0000000000
--- a/ext/sqlite/tests/sqlite_oo_031.phpt
+++ /dev/null
@@ -1,125 +0,0 @@
---TEST--
-sqlite-oo: and spl
---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->single_query('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 hasMore()
- {
- return is_object($this->entry);
- }
-
- function current()
- {
- return (string)$this->entry;
- }
-
- function key()
- {
- return $this->entry->key();;
- }
-
- function next()
- {
- $this->id = $this->entry->getRight() + 1;
- $this->fetch();
- }
-
- protected function fetch()
- {
- $res = $this->db->unbuffered_query('SELECT * FROM menu WHERE id_l='.$this->id);
- $this->entry = $res->fetch_object('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), RIT_SELF_FIRST);
-foreach($menu_iterator as $entry) {
- echo $menu_iterator->getDepth() . $entry . "\n";
-}
-?>
-===DONE===
---EXPECT--
-0A
-1B
-2C
-3D
-2E
-1F
-===DONE===