]> granicus.if.org Git - php/commitdiff
More tests.
authorMagnus M��tt� <magnus@php.net>
Wed, 9 Mar 2005 21:02:31 +0000 (21:02 +0000)
committerMagnus M��tt� <magnus@php.net>
Wed, 9 Mar 2005 21:02:31 +0000 (21:02 +0000)
ext/pdo_pgsql/tests/pdo_020.phpt [new file with mode: 0755]
ext/pdo_pgsql/tests/pdo_021.phpt [new file with mode: 0755]
ext/pdo_pgsql/tests/pdo_022.phpt [new file with mode: 0755]

diff --git a/ext/pdo_pgsql/tests/pdo_020.phpt b/ext/pdo_pgsql/tests/pdo_020.phpt
new file mode 100755 (executable)
index 0000000..ae5a6a0
--- /dev/null
@@ -0,0 +1,21 @@
+--TEST--
+PDO_PGSQL: PDOStatement::columnCount
+--SKIPIF--
+<?php # vim:ft=php
+require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+require_once('connection.inc');
+require_once('prepare.inc');
+
+require_once($PDO_TESTS . 'pdo_020.inc');
+
+?>
+===DONE===
+<?php exit(0); ?>
+--EXPECT--
+Counted 2 columns after select1.
+Counted 3 columns after select2.
+Counted 1 columns after select3.
+===DONE===
diff --git a/ext/pdo_pgsql/tests/pdo_021.phpt b/ext/pdo_pgsql/tests/pdo_021.phpt
new file mode 100755 (executable)
index 0000000..46f2302
--- /dev/null
@@ -0,0 +1,20 @@
+--TEST--
+PDO_PGSQL: PDOStatement::execute with parameter markers.
+--SKIPIF--
+<?php # vim:ft=php
+require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+require_once('connection.inc');
+require_once('prepare.inc');
+
+require_once($PDO_TESTS . 'pdo_021.inc');
+
+?>
+===DONE===
+<?php exit(0); ?>
+--EXPECT--
+There are 6 rows in the table.
+There are 12 rows in the table.
+===DONE===
diff --git a/ext/pdo_pgsql/tests/pdo_022.phpt b/ext/pdo_pgsql/tests/pdo_022.phpt
new file mode 100755 (executable)
index 0000000..cd4d931
--- /dev/null
@@ -0,0 +1,74 @@
+--TEST--
+PDO_PGSQL: PDOStatement::getColumnMeta
+--SKIPIF--
+<?php # vim:ft=php
+require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+require_once('connection.inc');
+require_once('prepare.inc');
+
+require_once($PDO_TESTS . 'pdo_022.inc');
+
+?>
+===DONE===
+<?php exit(0); ?>
+--EXPECT--
+array(6) {
+  ["pgsql:oid"]=>
+  int(23)
+  ["native_type"]=>
+  string(4) "int4"
+  ["name"]=>
+  string(2) "id"
+  ["len"]=>
+  int(4)
+  ["precision"]=>
+  int(-1)
+  ["pdo_type"]=>
+  int(1)
+}
+array(6) {
+  ["pgsql:oid"]=>
+  int(1043)
+  ["native_type"]=>
+  string(7) "varchar"
+  ["name"]=>
+  string(3) "val"
+  ["len"]=>
+  int(-1)
+  ["precision"]=>
+  int(14)
+  ["pdo_type"]=>
+  int(2)
+}
+array(6) {
+  ["pgsql:oid"]=>
+  int(1043)
+  ["native_type"]=>
+  string(7) "varchar"
+  ["name"]=>
+  string(4) "val2"
+  ["len"]=>
+  int(-1)
+  ["precision"]=>
+  int(20)
+  ["pdo_type"]=>
+  int(2)
+}
+array(6) {
+  ["pgsql:oid"]=>
+  int(20)
+  ["native_type"]=>
+  string(4) "int8"
+  ["name"]=>
+  string(5) "count"
+  ["len"]=>
+  int(8)
+  ["precision"]=>
+  int(-1)
+  ["pdo_type"]=>
+  int(2)
+}
+===DONE===