summaryrefslogtreecommitdiff
path: root/ext/pdo_odbc
diff options
context:
space:
mode:
authorDan Scott <dbs@php.net>2005-03-05 15:48:54 +0000
committerDan Scott <dbs@php.net>2005-03-05 15:48:54 +0000
commitfc825e2071a4762653f19fbff16983c49689f604 (patch)
tree4de409a6965df01c11508acef8355980539e0d3c /ext/pdo_odbc
parenteff0d6524057c5fc44d8f4f458f0271d6767d8bf (diff)
downloadphp-git-fc825e2071a4762653f19fbff16983c49689f604.tar.gz
Missed this one...
Diffstat (limited to 'ext/pdo_odbc')
-rwxr-xr-xext/pdo_odbc/tests/pdo_011.phpt183
1 files changed, 183 insertions, 0 deletions
diff --git a/ext/pdo_odbc/tests/pdo_011.phpt b/ext/pdo_odbc/tests/pdo_011.phpt
new file mode 100755
index 0000000000..c41dd44d05
--- /dev/null
+++ b/ext/pdo_odbc/tests/pdo_011.phpt
@@ -0,0 +1,183 @@
+--TEST--
+PDO_ODBC: PDO_FETCH_FUNC and statement overloading
+--SKIPIF--
+<?php # vim:ft=php
+require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+require_once('connection.inc');
+require_once('prepare.inc');
+
+$SQL = array('create'=>'CREATE TABLE test(id INT NOT NULL PRIMARY KEY, val VARCHAR(10), grp VARCHAR(10))');
+
+require_once($PDO_TESTS . 'pdo_011.inc');
+
+?>
+===DONE===
+<?php exit(0); ?>
+--EXPECTF--
+Test1::__construct(0,0)
+test(1,N/A)
+test(2,N/A)
+test(3,N/A)
+test(4,N/A)
+array(2) {
+ ["Group1"]=>
+ array(2) {
+ [0]=>
+ array(1) {
+ [1]=>
+ string(3) "N/A"
+ }
+ [1]=>
+ array(1) {
+ [2]=>
+ string(3) "N/A"
+ }
+ }
+ ["Group2"]=>
+ array(2) {
+ [0]=>
+ array(1) {
+ [3]=>
+ string(3) "N/A"
+ }
+ [1]=>
+ array(1) {
+ [4]=>
+ string(3) "N/A"
+ }
+ }
+}
+test(1,A)
+test(2,B)
+test(3,C)
+test(4,D)
+array(4) {
+ [0]=>
+ array(1) {
+ [1]=>
+ string(1) "A"
+ }
+ [1]=>
+ array(1) {
+ [2]=>
+ string(1) "B"
+ }
+ [2]=>
+ array(1) {
+ [3]=>
+ string(1) "C"
+ }
+ [3]=>
+ array(1) {
+ [4]=>
+ string(1) "D"
+ }
+}
+Test1::factory(1,A)
+Test1::__construct(1,A)
+Test1::factory(2,B)
+Test1::__construct(2,B)
+Test1::factory(3,C)
+Test1::__construct(3,C)
+Test1::factory(4,D)
+Test1::__construct(4,D)
+array(4) {
+ [0]=>
+ object(Test1)#%d (2) {
+ ["id"]=>
+ int(1)
+ ["val"]=>
+ string(1) "A"
+ }
+ [1]=>
+ object(Test1)#%d (2) {
+ ["id"]=>
+ int(2)
+ ["val"]=>
+ string(1) "B"
+ }
+ [2]=>
+ object(Test1)#%d (2) {
+ ["id"]=>
+ int(3)
+ ["val"]=>
+ string(1) "C"
+ }
+ [3]=>
+ object(Test1)#%d (2) {
+ ["id"]=>
+ int(4)
+ ["val"]=>
+ string(1) "D"
+ }
+}
+Test1::factory(1,A)
+Test1::__construct(1,A)
+Test1::factory(2,B)
+Test1::__construct(2,B)
+Test1::factory(3,C)
+Test1::__construct(3,C)
+Test1::factory(4,D)
+Test1::__construct(4,D)
+array(4) {
+ [0]=>
+ object(Test1)#%d (2) {
+ ["id"]=>
+ int(1)
+ ["val"]=>
+ string(1) "A"
+ }
+ [1]=>
+ object(Test1)#%d (2) {
+ ["id"]=>
+ int(2)
+ ["val"]=>
+ string(1) "B"
+ }
+ [2]=>
+ object(Test1)#%d (2) {
+ ["id"]=>
+ int(3)
+ ["val"]=>
+ string(1) "C"
+ }
+ [3]=>
+ object(Test1)#%d (2) {
+ ["id"]=>
+ int(4)
+ ["val"]=>
+ string(1) "D"
+ }
+}
+DerivedStatement::__construct(Overloaded)
+string(16) "DerivedStatement"
+DerivedStatement::retrieve(1,A)
+DerivedStatement::retrieve(2,B)
+DerivedStatement::retrieve(3,C)
+DerivedStatement::retrieve(4,D)
+array(4) {
+ [0]=>
+ array(1) {
+ [1]=>
+ string(1) "A"
+ }
+ [1]=>
+ array(1) {
+ [2]=>
+ string(1) "B"
+ }
+ [2]=>
+ array(1) {
+ [3]=>
+ string(1) "C"
+ }
+ [3]=>
+ array(1) {
+ [4]=>
+ string(1) "D"
+ }
+}
+===DONE===