cvs: pecl /pdo_odbc/tests connection.inc pdo_016.phpt pdo_018.phpt pdo_019.phpt pdo_023.phpt pdo_024.phpt pdo_025.phpt pdo_026.phpt prepare.inc

From: Date: Wed, 15 Jun 2005 00:17:19 +0000
Subject: cvs: pecl /pdo_odbc/tests connection.inc pdo_016.phpt pdo_018.phpt pdo_019.phpt pdo_023.phpt pdo_024.phpt pdo_025.phpt pdo_026.phpt prepare.inc
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-3290@lists.php.net to get a copy of this message
dbs Tue Jun 14 20:17:19 2005 EDT Added files: /pecl/pdo_odbc/tests pdo_016.phpt pdo_018.phpt pdo_019.phpt pdo_023.phpt pdo_024.phpt pdo_025.phpt pdo_026.phpt Modified files: /pecl/pdo_odbc/tests connection.inc prepare.inc Log: Bring PDO_ODBC tests in sync with PDO base tests.

http://cvs.php.net/diff.php/pecl/pdo_odbc/tests/connection.inc?r1=1.1&r2=1.2&ty=u Index: pecl/pdo_odbc/tests/connection.inc diff -u pecl/pdo_odbc/tests/connection.inc:1.1 pecl/pdo_odbc/tests/connection.inc:1.2 --- pecl/pdo_odbc/tests/connection.inc:1.1 Thu Mar 3 06:49:35 2005 +++ pecl/pdo_odbc/tests/connection.inc Tue Jun 14 20:17:18 2005 @@ -4,7 +4,7 @@ $PASSWD = 'ibmdb2'; $DBNAME = 'SAMPLE'; -$CONNECTION = "odbc:$DBNAME"; +$CONNECTION = "odbc:DSN=$DBNAME;UID=$USER;PWD=$PASSWD;"; $PDO_TESTS = dirname(__FILE__) . '/../../pdo/tests/'; http://cvs.php.net/diff.php/pecl/pdo_odbc/tests/prepare.inc?r1=1.1&r2=1.2&ty=u Index: pecl/pdo_odbc/tests/prepare.inc diff -u pecl/pdo_odbc/tests/prepare.inc:1.1 pecl/pdo_odbc/tests/prepare.inc:1.2 --- pecl/pdo_odbc/tests/prepare.inc:1.1 Thu Mar 3 06:49:35 2005 +++ pecl/pdo_odbc/tests/prepare.inc Tue Jun 14 20:17:18 2005 @@ -6,7 +6,8 @@ 'create'=>'CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10))' ); -$DB = new pdo($CONNECTION, $USER, $PASSWD); +//$DB = new pdo($CONNECTION, $USER, $PASSWD); +$DB = new pdo($CONNECTION); foreach(array('test','classtypes') as $name) { http://cvs.php.net/co.php/pecl/pdo_odbc/tests/pdo_016.phpt?r=1.1&p=1 Index: pecl/pdo_odbc/tests/pdo_016.phpt +++ pecl/pdo_odbc/tests/pdo_016.phpt --TEST-- PDO_ODBC: PDO_FETCH_BOUND --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); $DB->setAttribute(PDO_ATTR_CASE, PDO_CASE_LOWER); require_once($PDO_TESTS . 'pdo_016.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- ===INIT=== int(1) int(1) int(1) string(1) "3" array(3) { [0]=> string(7) "String0" [1]=> string(7) "String1" [2]=> string(7) "String2" } ===WHILE=== array(1) { [0]=> string(7) "String0" } array(1) { [1]=> string(7) "String1" } array(1) { [2]=> string(7) "String2" } ===ALONE=== array(1) { [0]=> string(7) "String0" } bool(true) bool(true) bool(true) bool(true) array(1) { [0]=> string(7) "String0" } array(1) { [1]=> string(7) "String1" } bool(true) bool(true) bool(true) bool(true) array(1) { [1]=> string(7) "String1" } array(1) { [2]=> string(7) "String2" } bool(true) bool(true) bool(true) bool(true) array(1) { [2]=> string(7) "String2" } ===REBIND/SAME=== array(1) { [0]=> string(7) "String0" } bool(true) bool(true) string(7) "String0" bool(true) bool(true) string(1) "0" array(1) { [1]=> string(7) "String1" } bool(true) bool(true) string(7) "String1" bool(true) bool(true) string(1) "1" array(1) { [2]=> string(7) "String2" } bool(true) bool(true) string(7) "String2" bool(true) bool(true) string(1) "2" ===REBIND/CONFLICT=== string(7) "String0" string(7) "String1" string(7) "String2" ===DONE=== http://cvs.php.net/co.php/pecl/pdo_odbc/tests/pdo_018.phpt?r=1.1&p=1 Index: pecl/pdo_odbc/tests/pdo_018.phpt +++ pecl/pdo_odbc/tests/pdo_018.phpt --TEST-- PDO_ODBC: PDO Unserializing --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); if (!interface_exists('Serializable')) die ('skip Interface Serializable does not exist'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); $SQL = array( 'create1'=>'CREATE TABLE classtypes(id INT NOT NULL PRIMARY KEY, name VARCHAR(20) NOT NULL UNIQUE)', ); $DB->setAttribute(PDO_ATTR_CASE, PDO_CASE_LOWER); require_once($PDO_TESTS . 'pdo_018.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- ===INIT=== int(1) int(1) int(1) string(1) "3" array(3) { [0]=> string(8) "stdClass" [1]=> string(8) "TestBase" [2]=> string(11) "TestDerived" } ===TYPES=== array(4) { ["stdClass"]=> string(1) "0" ["TestBase"]=> string(1) "1" ["TestDerived"]=> string(1) "2" ["TestLeaf"]=> NULL } ===INSERT=== TestBase::serialize() = 'a:3:{s:7:"BasePub";s:6:"Public";s:7:"BasePro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}' TestDerived::serialize() TestBase::serialize() = 'a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";}' TestDerived::serialize() TestBase::serialize() = 'a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";}' ===DATA=== array(4) { [0]=> NULL [1]=> string(91) "a:3:{s:7:"BasePub";s:6:"Public";s:7:"BasePro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}" [2]=> string(144) "a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";}" [3]=> string(144) "a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";}" } ===FAILURE=== Exception:SQLSTATE[HY000]: General error: cannot unserialize class ===COUNT=== string(1) "3" ===DATABASE=== array(3) { [0]=> array(2) { ["NAME"]=> string(8) "TestBase" ["VAL"]=> string(91) "a:3:{s:7:"BasePub";s:6:"Public";s:7:"BasePro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}" } [1]=> array(2) { ["NAME"]=> string(11) "TestDerived" ["VAL"]=> string(144) "a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";}" } [2]=> array(2) { ["NAME"]=> NULL ["VAL"]=> string(144) "a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";}" } } ===FETCHCLASS=== TestBase::unserialize[22](a:3:{s:7:"BasePub";s:6:"Public";s:7:"BasePro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}) TestDerived::unserialize() TestBase::unserialize[22](a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";}) TestDerived::unserialize() TestBase::unserialize[22](a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";}) array(3) { [0]=> object(TestBase)#%d (3) { ["BasePub"]=> string(7) "#Public" ["BasePro:protected"]=> string(10) "#Protected" ["BasePri:private"]=> string(8) "#Private" } [1]=> object(TestDerived)#%d (6) { ["BasePub"]=> string(14) "#DerivedPublic" ["BasePro:protected"]=> string(17) "#DerivdeProtected" ["DerivedPub"]=> string(7) "#Public" ["DerivedPro:protected"]=> string(10) "#Protected" ["DerivedPri:private"]=> string(7) "Private" ["BasePri:private"]=> string(7) "Private" } [2]=> object(TestLeaf)#%d (6) { ["BasePub"]=> string(14) "#DerivedPublic" ["BasePro:protected"]=> string(17) "#DerivdeProtected" ["DerivedPub"]=> string(7) "#Public" ["DerivedPro:protected"]=> string(10) "#Protected" ["DerivedPri:private"]=> string(7) "Private" ["BasePri:private"]=> string(7) "Private" } } ===DONE=== http://cvs.php.net/co.php/pecl/pdo_odbc/tests/pdo_019.phpt?r=1.1&p=1 Index: pecl/pdo_odbc/tests/pdo_019.phpt +++ pecl/pdo_odbc/tests/pdo_019.phpt --TEST-- PDO_ODBC: fetch() and while() --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); $DB->setAttribute(PDO_ATTR_CASE, PDO_CASE_LOWER); require_once($PDO_TESTS . 'pdo_019.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- ===INIT=== int(1) int(1) int(1) int(1) string(1) "4" array(4) { [0]=> string(7) "String0" [1]=> string(7) "String1" [2]=> string(7) "String2" [3]=> string(7) "String3" } ===WHILE=== array(1) { [0]=> string(7) "String0" } array(1) { [1]=> string(7) "String1" } array(1) { [2]=> string(7) "String2" } array(1) { [3]=> string(7) "String3" } ===DONE=== http://cvs.php.net/co.php/pecl/pdo_odbc/tests/pdo_023.phpt?r=1.1&p=1 Index: pecl/pdo_odbc/tests/pdo_023.phpt +++ pecl/pdo_odbc/tests/pdo_023.phpt --TEST-- PDO_ODBC: Overloading --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_023_def.inc'); $DB = NULL; $DB = new PDODatabaseX($CONNECTION, $USER, $PASSWD); $DB->setAttribute(PDO_ATTR_ERRMODE, PDO_ERRMODE_WARNING); require_once($PDO_TESTS . 'pdo_023.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- int(1) int(2) object(PDODatabaseX)#%d (2) { ["test1"]=> int(1) ["test2"]=> int(22) } PDODatabaseX::query() PDOStatementX::__construct() PDOStatementX::__destruct() PDODatabaseX::query() PDOStatementX::__construct() PDOStatementX::__destruct() PDODatabaseX::query() PDOStatementX::__construct() PDOStatementX::__destruct() PDODatabaseX::query() PDOStatementX::__construct() object(PDOStatementX)#%d (3) { ["test1"]=> int(1) ["queryString"]=> string(24) "SELECT val, id FROM test" ["test2"]=> int(22) } array(2) { ["A"]=> string(1) "0" ["B"]=> string(1) "1" } PDOStatementX::__destruct() PDODatabaseX::__destruct() ===DONE=== http://cvs.php.net/co.php/pecl/pdo_odbc/tests/pdo_024.phpt?r=1.1&p=1 Index: pecl/pdo_odbc/tests/pdo_024.phpt +++ pecl/pdo_odbc/tests/pdo_024.phpt --TEST-- PDO_ODBC: Bind does not convert NULL --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); $SQL['create'] = 'CREATE TABLE test(id INT, val VARCHAR(10))'; $DB->setAttribute(PDO_ATTR_CASE, PDO_CASE_LOWER); require_once($PDO_TESTS . 'pdo_024.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- bind: success bool(true) NULL ===DONE=== http://cvs.php.net/co.php/pecl/pdo_odbc/tests/pdo_025.phpt?r=1.1&p=1 Index: pecl/pdo_odbc/tests/pdo_025.phpt +++ pecl/pdo_odbc/tests/pdo_025.phpt --TEST-- PDO_ODBC: PDO_FETCH_INTO --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); $DB->setAttribute(PDO_ATTR_CASE, PDO_CASE_LOWER); require_once($PDO_TESTS . 'pdo_025.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- object(Test)#%d (3) { ["id"]=> string(2) "10" ["val"]=> string(3) "Abc" ["val2"]=> string(3) "zxy" } object(Test)#%d (3) { ["id"]=> string(2) "20" ["val"]=> string(3) "Def" ["val2"]=> string(3) "wvu" } object(Test)#%d (3) { ["id"]=> string(2) "30" ["val"]=> string(3) "Ghi" ["val2"]=> string(3) "tsr" } object(Test)#%d (3) { ["id"]=> string(2) "40" ["val"]=> string(3) "Jkl" ["val2"]=> string(3) "qpo" } object(Test)#%d (3) { ["id"]=> string(2) "50" ["val"]=> string(3) "Mno" ["val2"]=> string(3) "nml" } object(Test)#%d (3) { ["id"]=> string(2) "60" ["val"]=> string(3) "Pqr" ["val2"]=> string(3) "kji" } ===FAIL=== Fatal error: Cannot access protected property Fail::$id in %spdo_025.inc on line %d http://cvs.php.net/co.php/pecl/pdo_odbc/tests/pdo_026.phpt?r=1.1&p=1 Index: pecl/pdo_odbc/tests/pdo_026.phpt +++ pecl/pdo_odbc/tests/pdo_026.phpt --TEST-- PDO_ODBC: Deriving PDO --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_026.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECT-- string(11) "PDODatabase" string(12) "PDOStatement" PDODatabase::query() PDOStatementX::__construct() string(13) "PDOStatementX" string(11) "PDODatabase" array(3) { ["ID"]=> string(2) "10" ["VAL"]=> string(3) "Abc" ["VAL2"]=> string(3) "zxy" } array(3) { ["ID"]=> string(2) "20" ["VAL"]=> string(3) "Def" ["VAL2"]=> string(3) "wvu" } array(3) { ["ID"]=> string(2) "30" ["VAL"]=> string(3) "Ghi" ["VAL2"]=> string(3) "tsr" } ===DONE=== PDODatabase::__destruct() PDOStatementX::__destruct()
« previous php.pecl.cvs (#3290) next »