1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 16:38:25 +02:00

Next three tests for PDO_ODBC (tested with DB2 V8.2).

This commit is contained in:
Dan Scott
2005-03-03 20:23:29 +00:00
parent 12f1993f8e
commit dc4501cf99
3 changed files with 184 additions and 0 deletions
+72
View File
@@ -0,0 +1,72 @@
--TEST--
PDO_ODBC: PDOStatement::setFetchMode
--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_012.inc');
?>
===DONE===
<?php exit(0); ?>
--EXPECTF--
array(2) {
[0]=>
array(2) {
[0]=>
string(1) "A"
[1]=>
string(6) "Group1"
}
[1]=>
array(2) {
[0]=>
string(1) "B"
[1]=>
string(6) "Group2"
}
}
Test::__construct(N/A)
Test::__construct(N/A)
array(2) {
[0]=>
object(Test)#%d (2) {
["VAL"]=>
string(1) "A"
["GRP"]=>
string(6) "Group1"
}
[1]=>
object(Test)#%d (2) {
["VAL"]=>
string(1) "B"
["GRP"]=>
string(6) "Group2"
}
}
Test::__construct(Changed)
Test::__construct(Changed)
array(2) {
[0]=>
object(Test)#%d (2) {
["VAL"]=>
string(1) "A"
["GRP"]=>
string(6) "Group1"
}
[1]=>
object(Test)#%d (2) {
["VAL"]=>
string(1) "B"
["GRP"]=>
string(6) "Group2"
}
}
===DONE===
+60
View File
@@ -0,0 +1,60 @@
--TEST--
PDO_ODBC: PDOStatement is Traversable
--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_013.inc');
?>
===DONE===
<?php exit(0); ?>
--EXPECTF--
array(2) {
[0]=>
string(1) "A"
[1]=>
string(6) "Group1"
}
array(2) {
[0]=>
string(1) "B"
[1]=>
string(6) "Group2"
}
Test::__construct(N/A)
object(Test)#%d (2) {
["VAL"]=>
string(1) "A"
["GRP"]=>
string(6) "Group1"
}
Test::__construct(N/A)
object(Test)#%d (2) {
["VAL"]=>
string(1) "B"
["GRP"]=>
string(6) "Group2"
}
Test::__construct(WOW)
object(Test)#%d (2) {
["VAL"]=>
string(1) "A"
["GRP"]=>
string(6) "Group1"
}
Test::__construct(WOW)
object(Test)#%d (2) {
["VAL"]=>
string(1) "B"
["GRP"]=>
string(6) "Group2"
}
===DONE===
+52
View File
@@ -0,0 +1,52 @@
--TEST--
PDO_ODBC: 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');
$SQL = array('create'=>'CREATE TABLE test(id INT NOT NULL PRIMARY KEY, val VARCHAR(10), grp VARCHAR(10))');
require_once($PDO_TESTS . 'pdo_014.inc');
?>
===DONE===
<?php exit(0); ?>
--EXPECTF--
Test::__construct(WOW)
object(Test)#%d (2) {
["VAL"]=>
string(1) "A"
["GRP"]=>
string(6) "Group1"
}
Test::__construct(WOW)
object(Test)#%d (2) {
["VAL"]=>
string(1) "B"
["GRP"]=>
string(6) "Group2"
}
NULL
bool(false)
PDOStatementAggregate::__construct
PDOStatementAggregate::getIterator
array(2) {
[0]=>
string(1) "A"
[1]=>
string(6) "Group1"
}
array(2) {
[0]=>
string(1) "B"
[1]=>
string(6) "Group2"
}
===DONE===