cvs: php-src /ext/sqlite/tests/pdo .cvsignore connection.inc pdo_001.phpt pdo_002.phpt pdo_003.phpt pdo_004.phpt pdo_005.phpt pdo_006.phpt
pdo_007.phpt pdo_008.phpt pdo_009.phpt pdo_010.phpt pdo_011.phpt pdo_012.phpt pdo_013.phpt pdo_014.phpt pdo_015.phpt pdo_016.phpt pdo_017.phpt
pdo_018.phpt pdo_019.phpt pdo_020.phpt pdo_021.phpt pdo_022.phpt prepare.inc skipif.inc
| From: | Marcus Boerger | Date: | Sat, 12 Mar 2005 00:51:40 +0000 |
| Subject: | cvs: php-src /ext/sqlite/tests/pdo .cvsignore connection.inc pdo_001.phpt pdo_002.phpt pdo_003.phpt pdo_004.phpt pdo_005.phpt pdo_006.phpt pdo_007.phpt pdo_008.phpt pdo_009.phpt pdo_010.phpt pdo_011.phpt pdo_012.phpt pdo_013.phpt pdo_014.phpt pdo_015.phpt pdo_016.phpt pdo_017.phpt pdo_018.phpt pdo_019.phpt pdo_020.phpt pdo_021.phpt pdo_022.phpt prepare.inc skipif.inc |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-30881@lists.php.net to get a copy of this message | ||
helly Fri Mar 11 19:51:40 2005 EDT
Added files:
/php-src/ext/sqlite/tests/pdo .cvsignore connection.inc
pdo_001.phpt pdo_002.phpt
pdo_003.phpt pdo_004.phpt
pdo_005.phpt pdo_006.phpt
pdo_007.phpt pdo_008.phpt
pdo_009.phpt pdo_010.phpt
pdo_011.phpt pdo_012.phpt
pdo_013.phpt pdo_014.phpt
pdo_015.phpt pdo_016.phpt
pdo_017.phpt pdo_018.phpt
pdo_019.phpt pdo_020.phpt
pdo_021.phpt pdo_022.phpt prepare.inc
skipif.inc
Log:
- Add tests
http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/.cvsignore?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/.cvsignore +++ php-src/ext/sqlite/tests/pdo/.cvsignore phpt.* *.diff *.log *.exp *.out *.php *.db *.tmp *.gcda *.gcno http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/connection.inc?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/connection.inc +++ php-src/ext/sqlite/tests/pdo/connection.inc <?php $CONNECTION = 'sqlite2::memory:'; $PDO_TESTS = dirname(__FILE__) . '/../../../pdo/tests/'; ?> http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_001.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_001.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_001.phpt --TEST-- PDO_SQLite2: PDO_FETCH_ASSOC --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_001.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECT-- array(3) { [0]=> array(2) { ["id"]=> string(1) "1" ["val"]=> string(1) "A" } [1]=> array(2) { ["id"]=> string(1) "2" ["val"]=> string(1) "B" } [2]=> array(2) { ["id"]=> string(1) "3" ["val"]=> string(1) "C" } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_002.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_002.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_002.phpt --TEST-- PDO_SQLite2: PDO_FETCH_NUM --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_002.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECT-- array(3) { [0]=> array(2) { [0]=> string(1) "1" [1]=> string(1) "A" } [1]=> array(2) { [0]=> string(1) "2" [1]=> string(1) "B" } [2]=> array(2) { [0]=> string(1) "3" [1]=> string(1) "C" } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_003.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_003.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_003.phpt --TEST-- PDO_SQLite2: PDO_FETCH_BOTH --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_003.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECT-- array(3) { [0]=> array(4) { ["id"]=> string(1) "1" [0]=> string(1) "1" ["val"]=> string(1) "A" [1]=> string(1) "A" } [1]=> array(4) { ["id"]=> string(1) "2" [0]=> string(1) "2" ["val"]=> string(1) "B" [1]=> string(1) "B" } [2]=> array(4) { ["id"]=> string(1) "3" [0]=> string(1) "3" ["val"]=> string(1) "C" [1]=> string(1) "C" } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_004.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_004.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_004.phpt --TEST-- PDO_SQLite2: PDO_FETCH_OBJ --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_004.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- array(3) { [0]=> object(stdClass)#%d (2) { ["id"]=> string(1) "1" ["val"]=> string(1) "A" } [1]=> object(stdClass)#%d (2) { ["id"]=> string(1) "2" ["val"]=> string(1) "B" } [2]=> object(stdClass)#%d (2) { ["id"]=> string(1) "3" ["val"]=> string(1) "C" } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_005.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_005.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_005.phpt --TEST-- PDO_SQLite2: PDO_FETCH_CLASS --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_005.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- array(3) { [0]=> object(stdClass)#%d (3) { ["id"]=> string(1) "1" ["val"]=> string(1) "A" ["val2"]=> string(2) "AA" } [1]=> object(stdClass)#%d (3) { ["id"]=> string(1) "2" ["val"]=> string(1) "B" ["val2"]=> string(2) "BB" } [2]=> object(stdClass)#%d (3) { ["id"]=> string(1) "3" ["val"]=> string(1) "C" ["val2"]=> string(2) "CC" } } array(3) { [0]=> object(TestBase)#%d (3) { ["id"]=> string(1) "1" ["val:protected"]=> string(1) "A" ["val2:private"]=> string(2) "AA" } [1]=> object(TestBase)#%d (3) { ["id"]=> string(1) "2" ["val:protected"]=> string(1) "B" ["val2:private"]=> string(2) "BB" } [2]=> object(TestBase)#%d (3) { ["id"]=> string(1) "3" ["val:protected"]=> string(1) "C" ["val2:private"]=> string(2) "CC" } } TestDerived::__construct(0,1) TestDerived::__construct(1,2) TestDerived::__construct(2,3) array(3) { [0]=> object(TestDerived)#%d (5) { ["row:protected"]=> int(0) ["id"]=> string(1) "1" ["val:protected"]=> string(1) "A" ["val2:private"]=> NULL ["val2"]=> string(2) "AA" } [1]=> object(TestDerived)#%d (5) { ["row:protected"]=> int(1) ["id"]=> string(1) "2" ["val:protected"]=> string(1) "B" ["val2:private"]=> NULL ["val2"]=> string(2) "BB" } [2]=> object(TestDerived)#%d (5) { ["row:protected"]=> int(2) ["id"]=> string(1) "3" ["val:protected"]=> string(1) "C" ["val2:private"]=> NULL ["val2"]=> string(2) "CC" } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_006.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_006.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_006.phpt --TEST-- PDO_SQLite2: PDO_FETCH_GROUP --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_006.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- array(2) { ["A"]=> array(2) { [0]=> array(1) { [0]=> string(1) "1" } [1]=> array(1) { [0]=> string(1) "2" } } ["C"]=> array(1) { [0]=> array(1) { [0]=> string(1) "3" } } } array(2) { ["A"]=> array(2) { [0]=> array(1) { ["id"]=> string(1) "1" } [1]=> array(1) { ["id"]=> string(1) "2" } } ["C"]=> array(1) { [0]=> array(1) { ["id"]=> string(1) "3" } } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_007.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_007.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_007.phpt --TEST-- PDO_SQLite2: PDO_FETCH_UNIQUE --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_007.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- array(3) { ["A"]=> array(1) { [0]=> string(1) "A" } ["B"]=> array(1) { [0]=> string(1) "A" } ["C"]=> array(1) { [0]=> string(1) "C" } } array(3) { ["A"]=> array(1) { ["val"]=> string(1) "A" } ["B"]=> array(1) { ["val"]=> string(1) "A" } ["C"]=> array(1) { ["val"]=> string(1) "C" } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_008.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_008.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_008.phpt --TEST-- PDO_SQLite2: PDO_FETCH_UNIQUE conflict --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_008.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- array(2) { ["A"]=> array(1) { [0]=> string(1) "B" } ["C"]=> array(1) { [0]=> string(1) "C" } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_009.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_009.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_009.phpt --TEST-- PDO_SQLite2: PDO_FETCH_CLASSTYPE --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_009.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- array(4) { [0]=> array(3) { [0]=> string(8) "stdClass" [1]=> string(1) "1" [2]=> string(1) "A" } [1]=> array(3) { [0]=> string(5) "Test1" [1]=> string(1) "2" [2]=> string(1) "B" } [2]=> array(3) { [0]=> string(5) "Test2" [1]=> string(1) "3" [2]=> string(1) "C" } [3]=> array(3) { [0]=> NULL [1]=> string(1) "4" [2]=> string(1) "D" } } Test1::__construct() Test2::__construct() Test3::__construct() array(4) { [0]=> object(stdClass)#%d (2) { ["id"]=> string(1) "1" ["val"]=> string(1) "A" } [1]=> object(Test1)#%d (2) { ["id"]=> string(1) "2" ["val"]=> string(1) "B" } [2]=> object(Test2)#%d (2) { ["id"]=> string(1) "3" ["val"]=> string(1) "C" } [3]=> object(Test3)#%d (2) { ["id"]=> string(1) "4" ["val"]=> string(1) "D" } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_010.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_010.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_010.phpt --TEST-- PDO_SQLite2: PDO_FETCH_(CLASSTYPE and GROUP/UNIQUE) --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_010.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- Test1::__construct() Test2::__construct() Test3::__construct() array(2) { ["Group1"]=> array(2) { [0]=> object(stdClass)#%d (2) { ["id"]=> string(1) "1" ["val"]=> string(1) "A" } [1]=> object(Test1)#%d (2) { ["id"]=> string(1) "2" ["val"]=> string(1) "B" } } ["Group2"]=> array(2) { [0]=> object(Test2)#%d (2) { ["id"]=> string(1) "3" ["val"]=> string(1) "C" } [1]=> object(Test3)#%d (2) { ["id"]=> string(1) "4" ["val"]=> string(1) "D" } } } Test1::__construct() Test2::__construct() Test3::__construct() array(2) { ["Group1"]=> object(Test1)#%d (2) { ["id"]=> string(1) "2" ["val"]=> string(1) "B" } ["Group2"]=> object(Test3)#%d (2) { ["id"]=> string(1) "4" ["val"]=> string(1) "D" } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_011.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_011.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_011.phpt --TEST-- PDO_SQLite2: 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'); 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"]=> string(1) "1" ["val"]=> string(1) "A" } [1]=> object(Test1)#%d (2) { ["id"]=> string(1) "2" ["val"]=> string(1) "B" } [2]=> object(Test1)#%d (2) { ["id"]=> string(1) "3" ["val"]=> string(1) "C" } [3]=> object(Test1)#%d (2) { ["id"]=> string(1) "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"]=> string(1) "1" ["val"]=> string(1) "A" } [1]=> object(Test1)#%d (2) { ["id"]=> string(1) "2" ["val"]=> string(1) "B" } [2]=> object(Test1)#%d (2) { ["id"]=> string(1) "3" ["val"]=> string(1) "C" } [3]=> object(Test1)#%d (2) { ["id"]=> string(1) "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=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_012.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_012.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_012.phpt --TEST-- PDO_SQLite2: PDOStatement::setFetchMode --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); 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=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_013.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_013.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_013.phpt --TEST-- PDO_SQLite2: PDOStatement is Traversable --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); 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=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_014.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_014.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_014.phpt --TEST-- PDO_SQLite2: 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(2) { [0]=> string(1) "A" [1]=> string(6) "Group1" } array(2) { [0]=> string(1) "B" [1]=> string(6) "Group2" } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_015.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_015.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_015.phpt --TEST-- PDO_SQLite2: PDO_FETCH_COLUMN --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_015.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- array(2) { [0]=> string(1) "1" [1]=> string(1) "2" } array(2) { [0]=> string(2) "A2" [1]=> string(2) "B2" } array(2) { [1]=> array(1) { [0]=> string(1) "A" } [2]=> array(1) { [0]=> string(1) "A" } } array(2) { [1]=> string(1) "A" [2]=> string(1) "A" } array(2) { [1]=> string(1) "1" [2]=> string(1) "2" } array(2) { [1]=> string(1) "A" [2]=> string(1) "A" } array(2) { [1]=> string(2) "A2" [2]=> string(2) "B2" } array(1) { ["A"]=> array(2) { [0]=> string(2) "A2" [1]=> string(2) "B2" } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_016.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_016.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_016.phpt --TEST-- PDO_SQLite2: PDO_FETCH_BOUND --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); 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/php-src/ext/sqlite/tests/pdo/pdo_017.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_017.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_017.phpt --TEST-- PDO_SQLite2: PDO::beginTransaction / PDO::rollBack --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_017.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECT-- Counted 3 rows after insert. Counted 0 rows after delete. Counted 3 rows after rollback. ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_018.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_018.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_018.phpt --TEST-- PDO_SQLite2: PDO Unserializing --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); 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/php-src/ext/sqlite/tests/pdo/pdo_019.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_019.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_019.phpt --TEST-- PDO_SQLite2: fetch() and while() --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); 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/php-src/ext/sqlite/tests/pdo/pdo_020.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_020.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_020.phpt --TEST-- PDO_SQLite2: 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=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_021.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_021.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_021.phpt --TEST-- PDO_SQLite2: 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=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_022.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_022.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_022.phpt --TEST-- PDO_SQLite2: 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(7) { ["native_type"]=> string(7) "integer" ["sqlite:decl_type"]=> string(3) "INT" ["flags"]=> array(0) { } ["name"]=> string(2) "id" ["len"]=> int(-1) ["precision"]=> int(0) ["pdo_type"]=> int(2) } array(7) { ["native_type"]=> string(6) "string" ["sqlite:decl_type"]=> string(11) "VARCHAR(10)" ["flags"]=> array(0) { } ["name"]=> string(3) "val" ["len"]=> int(-1) ["precision"]=> int(0) ["pdo_type"]=> int(2) } array(7) { ["native_type"]=> string(6) "string" ["sqlite:decl_type"]=> string(11) "VARCHAR(16)" ["flags"]=> array(0) { } ["name"]=> string(4) "val2" ["len"]=> int(-1) ["precision"]=> int(0) ["pdo_type"]=> int(2) } array(6) { ["native_type"]=> string(7) "integer" ["flags"]=> array(0) { } ["name"]=> string(8) "COUNT(*)" ["len"]=> int(-1) ["precision"]=> int(0) ["pdo_type"]=> int(2) } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/prepare.inc?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/prepare.inc +++ php-src/ext/sqlite/tests/pdo/prepare.inc <?php require_once('connection.inc'); $SQL = array(); $DB = new pdo($CONNECTION); $DB->setAttribute(PDO_ATTR_ERRMODE, PDO_ERRMODE_WARNING); ?> http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/skipif.inc?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/skipif.inc +++ php-src/ext/sqlite/tests/pdo/skipif.inc <?php if (!extension_loaded("sqlite") || !extension_loaded("sqlite")) print "skip"; ?>
http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/.cvsignore?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/.cvsignore +++ php-src/ext/sqlite/tests/pdo/.cvsignore phpt.* *.diff *.log *.exp *.out *.php *.db *.tmp *.gcda *.gcno http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/connection.inc?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/connection.inc +++ php-src/ext/sqlite/tests/pdo/connection.inc <?php $CONNECTION = 'sqlite2::memory:'; $PDO_TESTS = dirname(__FILE__) . '/../../../pdo/tests/'; ?> http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_001.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_001.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_001.phpt --TEST-- PDO_SQLite2: PDO_FETCH_ASSOC --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_001.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECT-- array(3) { [0]=> array(2) { ["id"]=> string(1) "1" ["val"]=> string(1) "A" } [1]=> array(2) { ["id"]=> string(1) "2" ["val"]=> string(1) "B" } [2]=> array(2) { ["id"]=> string(1) "3" ["val"]=> string(1) "C" } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_002.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_002.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_002.phpt --TEST-- PDO_SQLite2: PDO_FETCH_NUM --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_002.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECT-- array(3) { [0]=> array(2) { [0]=> string(1) "1" [1]=> string(1) "A" } [1]=> array(2) { [0]=> string(1) "2" [1]=> string(1) "B" } [2]=> array(2) { [0]=> string(1) "3" [1]=> string(1) "C" } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_003.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_003.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_003.phpt --TEST-- PDO_SQLite2: PDO_FETCH_BOTH --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_003.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECT-- array(3) { [0]=> array(4) { ["id"]=> string(1) "1" [0]=> string(1) "1" ["val"]=> string(1) "A" [1]=> string(1) "A" } [1]=> array(4) { ["id"]=> string(1) "2" [0]=> string(1) "2" ["val"]=> string(1) "B" [1]=> string(1) "B" } [2]=> array(4) { ["id"]=> string(1) "3" [0]=> string(1) "3" ["val"]=> string(1) "C" [1]=> string(1) "C" } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_004.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_004.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_004.phpt --TEST-- PDO_SQLite2: PDO_FETCH_OBJ --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_004.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- array(3) { [0]=> object(stdClass)#%d (2) { ["id"]=> string(1) "1" ["val"]=> string(1) "A" } [1]=> object(stdClass)#%d (2) { ["id"]=> string(1) "2" ["val"]=> string(1) "B" } [2]=> object(stdClass)#%d (2) { ["id"]=> string(1) "3" ["val"]=> string(1) "C" } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_005.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_005.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_005.phpt --TEST-- PDO_SQLite2: PDO_FETCH_CLASS --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_005.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- array(3) { [0]=> object(stdClass)#%d (3) { ["id"]=> string(1) "1" ["val"]=> string(1) "A" ["val2"]=> string(2) "AA" } [1]=> object(stdClass)#%d (3) { ["id"]=> string(1) "2" ["val"]=> string(1) "B" ["val2"]=> string(2) "BB" } [2]=> object(stdClass)#%d (3) { ["id"]=> string(1) "3" ["val"]=> string(1) "C" ["val2"]=> string(2) "CC" } } array(3) { [0]=> object(TestBase)#%d (3) { ["id"]=> string(1) "1" ["val:protected"]=> string(1) "A" ["val2:private"]=> string(2) "AA" } [1]=> object(TestBase)#%d (3) { ["id"]=> string(1) "2" ["val:protected"]=> string(1) "B" ["val2:private"]=> string(2) "BB" } [2]=> object(TestBase)#%d (3) { ["id"]=> string(1) "3" ["val:protected"]=> string(1) "C" ["val2:private"]=> string(2) "CC" } } TestDerived::__construct(0,1) TestDerived::__construct(1,2) TestDerived::__construct(2,3) array(3) { [0]=> object(TestDerived)#%d (5) { ["row:protected"]=> int(0) ["id"]=> string(1) "1" ["val:protected"]=> string(1) "A" ["val2:private"]=> NULL ["val2"]=> string(2) "AA" } [1]=> object(TestDerived)#%d (5) { ["row:protected"]=> int(1) ["id"]=> string(1) "2" ["val:protected"]=> string(1) "B" ["val2:private"]=> NULL ["val2"]=> string(2) "BB" } [2]=> object(TestDerived)#%d (5) { ["row:protected"]=> int(2) ["id"]=> string(1) "3" ["val:protected"]=> string(1) "C" ["val2:private"]=> NULL ["val2"]=> string(2) "CC" } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_006.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_006.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_006.phpt --TEST-- PDO_SQLite2: PDO_FETCH_GROUP --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_006.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- array(2) { ["A"]=> array(2) { [0]=> array(1) { [0]=> string(1) "1" } [1]=> array(1) { [0]=> string(1) "2" } } ["C"]=> array(1) { [0]=> array(1) { [0]=> string(1) "3" } } } array(2) { ["A"]=> array(2) { [0]=> array(1) { ["id"]=> string(1) "1" } [1]=> array(1) { ["id"]=> string(1) "2" } } ["C"]=> array(1) { [0]=> array(1) { ["id"]=> string(1) "3" } } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_007.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_007.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_007.phpt --TEST-- PDO_SQLite2: PDO_FETCH_UNIQUE --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_007.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- array(3) { ["A"]=> array(1) { [0]=> string(1) "A" } ["B"]=> array(1) { [0]=> string(1) "A" } ["C"]=> array(1) { [0]=> string(1) "C" } } array(3) { ["A"]=> array(1) { ["val"]=> string(1) "A" } ["B"]=> array(1) { ["val"]=> string(1) "A" } ["C"]=> array(1) { ["val"]=> string(1) "C" } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_008.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_008.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_008.phpt --TEST-- PDO_SQLite2: PDO_FETCH_UNIQUE conflict --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_008.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- array(2) { ["A"]=> array(1) { [0]=> string(1) "B" } ["C"]=> array(1) { [0]=> string(1) "C" } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_009.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_009.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_009.phpt --TEST-- PDO_SQLite2: PDO_FETCH_CLASSTYPE --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_009.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- array(4) { [0]=> array(3) { [0]=> string(8) "stdClass" [1]=> string(1) "1" [2]=> string(1) "A" } [1]=> array(3) { [0]=> string(5) "Test1" [1]=> string(1) "2" [2]=> string(1) "B" } [2]=> array(3) { [0]=> string(5) "Test2" [1]=> string(1) "3" [2]=> string(1) "C" } [3]=> array(3) { [0]=> NULL [1]=> string(1) "4" [2]=> string(1) "D" } } Test1::__construct() Test2::__construct() Test3::__construct() array(4) { [0]=> object(stdClass)#%d (2) { ["id"]=> string(1) "1" ["val"]=> string(1) "A" } [1]=> object(Test1)#%d (2) { ["id"]=> string(1) "2" ["val"]=> string(1) "B" } [2]=> object(Test2)#%d (2) { ["id"]=> string(1) "3" ["val"]=> string(1) "C" } [3]=> object(Test3)#%d (2) { ["id"]=> string(1) "4" ["val"]=> string(1) "D" } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_010.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_010.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_010.phpt --TEST-- PDO_SQLite2: PDO_FETCH_(CLASSTYPE and GROUP/UNIQUE) --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_010.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- Test1::__construct() Test2::__construct() Test3::__construct() array(2) { ["Group1"]=> array(2) { [0]=> object(stdClass)#%d (2) { ["id"]=> string(1) "1" ["val"]=> string(1) "A" } [1]=> object(Test1)#%d (2) { ["id"]=> string(1) "2" ["val"]=> string(1) "B" } } ["Group2"]=> array(2) { [0]=> object(Test2)#%d (2) { ["id"]=> string(1) "3" ["val"]=> string(1) "C" } [1]=> object(Test3)#%d (2) { ["id"]=> string(1) "4" ["val"]=> string(1) "D" } } } Test1::__construct() Test2::__construct() Test3::__construct() array(2) { ["Group1"]=> object(Test1)#%d (2) { ["id"]=> string(1) "2" ["val"]=> string(1) "B" } ["Group2"]=> object(Test3)#%d (2) { ["id"]=> string(1) "4" ["val"]=> string(1) "D" } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_011.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_011.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_011.phpt --TEST-- PDO_SQLite2: 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'); 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"]=> string(1) "1" ["val"]=> string(1) "A" } [1]=> object(Test1)#%d (2) { ["id"]=> string(1) "2" ["val"]=> string(1) "B" } [2]=> object(Test1)#%d (2) { ["id"]=> string(1) "3" ["val"]=> string(1) "C" } [3]=> object(Test1)#%d (2) { ["id"]=> string(1) "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"]=> string(1) "1" ["val"]=> string(1) "A" } [1]=> object(Test1)#%d (2) { ["id"]=> string(1) "2" ["val"]=> string(1) "B" } [2]=> object(Test1)#%d (2) { ["id"]=> string(1) "3" ["val"]=> string(1) "C" } [3]=> object(Test1)#%d (2) { ["id"]=> string(1) "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=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_012.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_012.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_012.phpt --TEST-- PDO_SQLite2: PDOStatement::setFetchMode --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); 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=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_013.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_013.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_013.phpt --TEST-- PDO_SQLite2: PDOStatement is Traversable --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); 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=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_014.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_014.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_014.phpt --TEST-- PDO_SQLite2: 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(2) { [0]=> string(1) "A" [1]=> string(6) "Group1" } array(2) { [0]=> string(1) "B" [1]=> string(6) "Group2" } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_015.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_015.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_015.phpt --TEST-- PDO_SQLite2: PDO_FETCH_COLUMN --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_015.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- array(2) { [0]=> string(1) "1" [1]=> string(1) "2" } array(2) { [0]=> string(2) "A2" [1]=> string(2) "B2" } array(2) { [1]=> array(1) { [0]=> string(1) "A" } [2]=> array(1) { [0]=> string(1) "A" } } array(2) { [1]=> string(1) "A" [2]=> string(1) "A" } array(2) { [1]=> string(1) "1" [2]=> string(1) "2" } array(2) { [1]=> string(1) "A" [2]=> string(1) "A" } array(2) { [1]=> string(2) "A2" [2]=> string(2) "B2" } array(1) { ["A"]=> array(2) { [0]=> string(2) "A2" [1]=> string(2) "B2" } } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_016.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_016.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_016.phpt --TEST-- PDO_SQLite2: PDO_FETCH_BOUND --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); 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/php-src/ext/sqlite/tests/pdo/pdo_017.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_017.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_017.phpt --TEST-- PDO_SQLite2: PDO::beginTransaction / PDO::rollBack --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); require_once($PDO_TESTS . 'pdo_017.inc'); ?> ===DONE=== <?php exit(0); ?> --EXPECT-- Counted 3 rows after insert. Counted 0 rows after delete. Counted 3 rows after rollback. ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_018.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_018.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_018.phpt --TEST-- PDO_SQLite2: PDO Unserializing --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); 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/php-src/ext/sqlite/tests/pdo/pdo_019.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_019.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_019.phpt --TEST-- PDO_SQLite2: fetch() and while() --SKIPIF-- <?php # vim:ft=php require_once('skipif.inc'); ?> --FILE-- <?php require_once('connection.inc'); require_once('prepare.inc'); 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/php-src/ext/sqlite/tests/pdo/pdo_020.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_020.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_020.phpt --TEST-- PDO_SQLite2: 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=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_021.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_021.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_021.phpt --TEST-- PDO_SQLite2: 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=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/pdo_022.phpt?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/pdo_022.phpt +++ php-src/ext/sqlite/tests/pdo/pdo_022.phpt --TEST-- PDO_SQLite2: 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(7) { ["native_type"]=> string(7) "integer" ["sqlite:decl_type"]=> string(3) "INT" ["flags"]=> array(0) { } ["name"]=> string(2) "id" ["len"]=> int(-1) ["precision"]=> int(0) ["pdo_type"]=> int(2) } array(7) { ["native_type"]=> string(6) "string" ["sqlite:decl_type"]=> string(11) "VARCHAR(10)" ["flags"]=> array(0) { } ["name"]=> string(3) "val" ["len"]=> int(-1) ["precision"]=> int(0) ["pdo_type"]=> int(2) } array(7) { ["native_type"]=> string(6) "string" ["sqlite:decl_type"]=> string(11) "VARCHAR(16)" ["flags"]=> array(0) { } ["name"]=> string(4) "val2" ["len"]=> int(-1) ["precision"]=> int(0) ["pdo_type"]=> int(2) } array(6) { ["native_type"]=> string(7) "integer" ["flags"]=> array(0) { } ["name"]=> string(8) "COUNT(*)" ["len"]=> int(-1) ["precision"]=> int(0) ["pdo_type"]=> int(2) } ===DONE=== http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/prepare.inc?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/prepare.inc +++ php-src/ext/sqlite/tests/pdo/prepare.inc <?php require_once('connection.inc'); $SQL = array(); $DB = new pdo($CONNECTION); $DB->setAttribute(PDO_ATTR_ERRMODE, PDO_ERRMODE_WARNING); ?> http://cvs.php.net/co.php/php-src/ext/sqlite/tests/pdo/skipif.inc?r=1.1&p=1 Index: php-src/ext/sqlite/tests/pdo/skipif.inc +++ php-src/ext/sqlite/tests/pdo/skipif.inc <?php if (!extension_loaded("sqlite") || !extension_loaded("sqlite")) print "skip"; ?>