]> granicus.if.org Git - php/commitdiff
- Add new tests
authorMarcus Boerger <helly@php.net>
Wed, 23 Feb 2005 01:13:13 +0000 (01:13 +0000)
committerMarcus Boerger <helly@php.net>
Wed, 23 Feb 2005 01:13:13 +0000 (01:13 +0000)
ext/pdo_mysql/tests/pdo_mysql_014.phpt [new file with mode: 0755]
ext/pdo_pgsql/tests/pdo_pgsql_014.phpt [new file with mode: 0755]
ext/pdo_sqlite/tests/pdo_sqlite_014.phpt [new file with mode: 0755]

diff --git a/ext/pdo_mysql/tests/pdo_mysql_014.phpt b/ext/pdo_mysql/tests/pdo_mysql_014.phpt
new file mode 100755 (executable)
index 0000000..493a1f7
--- /dev/null
@@ -0,0 +1,58 @@
+--TEST--
+PDO_MySQL: PDOStatement and SPL Iterators
+--SKIPIF--
+<?php # vim:ft=php
+require_once('skipif.inc');
+if (!extension_loaded('SPL')) die('skip SPL not available');
+?>
+--FILE--
+<?php
+
+require_once('connection.inc');
+require_once('prepare.inc');
+
+require_once($PDO_TESTS . 'pdo_014.inc');
+
+?>
+===DONE===
+<?php exit(0); ?>
+--EXPECTF--
+Test::__construct(WOW)
+object(Test)#4 (2) {
+  ["val"]=>
+  string(1) "A"
+  ["grp"]=>
+  string(6) "Group1"
+}
+Test::__construct(WOW)
+object(Test)#6 (2) {
+  ["val"]=>
+  string(1) "B"
+  ["grp"]=>
+  string(6) "Group2"
+}
+NULL
+bool(false)
+PDOStatementAggregate::__construct
+PDOStatementAggregate::getIterator
+array(4) {
+  ["val"]=>
+  string(1) "A"
+  [0]=>
+  string(1) "A"
+  ["grp"]=>
+  string(6) "Group1"
+  [1]=>
+  string(6) "Group1"
+}
+array(4) {
+  ["val"]=>
+  string(1) "B"
+  [0]=>
+  string(1) "B"
+  ["grp"]=>
+  string(6) "Group2"
+  [1]=>
+  string(6) "Group2"
+}
+===DONE===
diff --git a/ext/pdo_pgsql/tests/pdo_pgsql_014.phpt b/ext/pdo_pgsql/tests/pdo_pgsql_014.phpt
new file mode 100755 (executable)
index 0000000..9a622d3
--- /dev/null
@@ -0,0 +1,58 @@
+--TEST--
+PDO_PGSQL: PDOStatement and SPL Iterators
+--SKIPIF--
+<?php # vim:ft=php
+require_once('skipif.inc');
+if (!extension_loaded('SPL')) die('skip SPL not available');
+?>
+--FILE--
+<?php
+
+require_once('connection.inc');
+require_once('prepare.inc');
+
+require_once($PDO_TESTS . 'pdo_014.inc');
+
+?>
+===DONE===
+<?php exit(0); ?>
+--EXPECTF--
+Test::__construct(WOW)
+object(Test)#4 (2) {
+  ["val"]=>
+  string(1) "A"
+  ["grp"]=>
+  string(6) "Group1"
+}
+Test::__construct(WOW)
+object(Test)#6 (2) {
+  ["val"]=>
+  string(1) "B"
+  ["grp"]=>
+  string(6) "Group2"
+}
+NULL
+bool(false)
+PDOStatementAggregate::__construct
+PDOStatementAggregate::getIterator
+array(4) {
+  ["val"]=>
+  string(1) "A"
+  [0]=>
+  string(1) "A"
+  ["grp"]=>
+  string(6) "Group1"
+  [1]=>
+  string(6) "Group1"
+}
+array(4) {
+  ["val"]=>
+  string(1) "B"
+  [0]=>
+  string(1) "B"
+  ["grp"]=>
+  string(6) "Group2"
+  [1]=>
+  string(6) "Group2"
+}
+===DONE===
diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_014.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_014.phpt
new file mode 100755 (executable)
index 0000000..193019c
--- /dev/null
@@ -0,0 +1,58 @@
+--TEST--
+PDO_SQLite: PDOStatement and SPL Iterators
+--SKIPIF--
+<?php # vim:ft=php
+require_once('skipif.inc');
+if (!extension_loaded('SPL')) die('skip SPL not available');
+?>
+--FILE--
+<?php
+
+require_once('connection.inc');
+require_once('prepare.inc');
+
+require_once($PDO_TESTS . 'pdo_014.inc');
+
+?>
+===DONE===
+<?php exit(0); ?>
+--EXPECTF--
+Test::__construct(WOW)
+object(Test)#4 (2) {
+  ["val"]=>
+  string(1) "A"
+  ["grp"]=>
+  string(6) "Group1"
+}
+Test::__construct(WOW)
+object(Test)#6 (2) {
+  ["val"]=>
+  string(1) "B"
+  ["grp"]=>
+  string(6) "Group2"
+}
+NULL
+bool(false)
+PDOStatementAggregate::__construct
+PDOStatementAggregate::getIterator
+array(4) {
+  ["val"]=>
+  string(1) "A"
+  [0]=>
+  string(1) "A"
+  ["grp"]=>
+  string(6) "Group1"
+  [1]=>
+  string(6) "Group1"
+}
+array(4) {
+  ["val"]=>
+  string(1) "B"
+  [0]=>
+  string(1) "B"
+  ["grp"]=>
+  string(6) "Group2"
+  [1]=>
+  string(6) "Group2"
+}
+===DONE===