From e65d57535f798c1ebf82afff2185cbc6508f7b70 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Magnus=20M=EF=BF=BD=EF=BF=BDtt=EF=BF=BD?= Date: Thu, 10 Mar 2005 02:43:44 +0000 Subject: [PATCH] Add tests for firebird. --- ext/pdo_firebird/tests/connection.inc | 10 ++ ext/pdo_firebird/tests/pdo_001.phpt | 41 ++++++ ext/pdo_firebird/tests/pdo_002.phpt | 41 ++++++ ext/pdo_firebird/tests/pdo_003.phpt | 53 ++++++++ ext/pdo_firebird/tests/pdo_004.phpt | 41 ++++++ ext/pdo_firebird/tests/pdo_005.phpt | 120 +++++++++++++++++ ext/pdo_firebird/tests/pdo_006.phpt | 64 +++++++++ ext/pdo_firebird/tests/pdo_007.phpt | 52 ++++++++ ext/pdo_firebird/tests/pdo_008.phpt | 30 +++++ ext/pdo_firebird/tests/pdo_009.phpt | 89 +++++++++++++ ext/pdo_firebird/tests/pdo_010.phpt | 76 +++++++++++ ext/pdo_firebird/tests/pdo_011.phpt | 181 ++++++++++++++++++++++++++ ext/pdo_firebird/tests/pdo_012.phpt | 70 ++++++++++ ext/pdo_firebird/tests/pdo_013.phpt | 58 +++++++++ ext/pdo_firebird/tests/pdo_014.phpt | 50 +++++++ ext/pdo_firebird/tests/pdo_015.phpt | 77 +++++++++++ ext/pdo_firebird/tests/pdo_019.phpt | 52 ++++++++ ext/pdo_firebird/tests/pdo_020.phpt | 21 +++ ext/pdo_firebird/tests/pdo_021.phpt | 20 +++ ext/pdo_firebird/tests/prepare.inc | 15 +++ 20 files changed, 1161 insertions(+) create mode 100755 ext/pdo_firebird/tests/connection.inc create mode 100755 ext/pdo_firebird/tests/pdo_001.phpt create mode 100755 ext/pdo_firebird/tests/pdo_002.phpt create mode 100755 ext/pdo_firebird/tests/pdo_003.phpt create mode 100755 ext/pdo_firebird/tests/pdo_004.phpt create mode 100755 ext/pdo_firebird/tests/pdo_005.phpt create mode 100755 ext/pdo_firebird/tests/pdo_006.phpt create mode 100755 ext/pdo_firebird/tests/pdo_007.phpt create mode 100755 ext/pdo_firebird/tests/pdo_008.phpt create mode 100755 ext/pdo_firebird/tests/pdo_009.phpt create mode 100755 ext/pdo_firebird/tests/pdo_010.phpt create mode 100755 ext/pdo_firebird/tests/pdo_011.phpt create mode 100755 ext/pdo_firebird/tests/pdo_012.phpt create mode 100755 ext/pdo_firebird/tests/pdo_013.phpt create mode 100755 ext/pdo_firebird/tests/pdo_014.phpt create mode 100755 ext/pdo_firebird/tests/pdo_015.phpt create mode 100755 ext/pdo_firebird/tests/pdo_019.phpt create mode 100755 ext/pdo_firebird/tests/pdo_020.phpt create mode 100755 ext/pdo_firebird/tests/pdo_021.phpt create mode 100755 ext/pdo_firebird/tests/prepare.inc diff --git a/ext/pdo_firebird/tests/connection.inc b/ext/pdo_firebird/tests/connection.inc new file mode 100755 index 0000000000..84cc61a8ea --- /dev/null +++ b/ext/pdo_firebird/tests/connection.inc @@ -0,0 +1,10 @@ + diff --git a/ext/pdo_firebird/tests/pdo_001.phpt b/ext/pdo_firebird/tests/pdo_001.phpt new file mode 100755 index 0000000000..43580b64b4 --- /dev/null +++ b/ext/pdo_firebird/tests/pdo_001.phpt @@ -0,0 +1,41 @@ +--TEST-- +PDO_Firebird: PDO_FETCH_ASSOC +--SKIPIF-- + +--FILE-- + +===DONE=== + +--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=== diff --git a/ext/pdo_firebird/tests/pdo_002.phpt b/ext/pdo_firebird/tests/pdo_002.phpt new file mode 100755 index 0000000000..2480d2295a --- /dev/null +++ b/ext/pdo_firebird/tests/pdo_002.phpt @@ -0,0 +1,41 @@ +--TEST-- +PDO_Firebird: PDO_FETCH_NUM +--SKIPIF-- + +--FILE-- + +===DONE=== + +--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=== diff --git a/ext/pdo_firebird/tests/pdo_003.phpt b/ext/pdo_firebird/tests/pdo_003.phpt new file mode 100755 index 0000000000..1948e34354 --- /dev/null +++ b/ext/pdo_firebird/tests/pdo_003.phpt @@ -0,0 +1,53 @@ +--TEST-- +PDO_Firebird: PDO_FETCH_BOTH +--SKIPIF-- + +--FILE-- + +===DONE=== + +--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=== diff --git a/ext/pdo_firebird/tests/pdo_004.phpt b/ext/pdo_firebird/tests/pdo_004.phpt new file mode 100755 index 0000000000..ab248c19ea --- /dev/null +++ b/ext/pdo_firebird/tests/pdo_004.phpt @@ -0,0 +1,41 @@ +--TEST-- +PDO_Firebird: PDO_FETCH_OBJ +--SKIPIF-- + +--FILE-- + +===DONE=== + +--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=== diff --git a/ext/pdo_firebird/tests/pdo_005.phpt b/ext/pdo_firebird/tests/pdo_005.phpt new file mode 100755 index 0000000000..58eb95f6f4 --- /dev/null +++ b/ext/pdo_firebird/tests/pdo_005.phpt @@ -0,0 +1,120 @@ +--TEST-- +PDO_Firebird: PDO_FETCH_CLASS +--SKIPIF-- + +--FILE-- + +===DONE=== + +--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=== diff --git a/ext/pdo_firebird/tests/pdo_006.phpt b/ext/pdo_firebird/tests/pdo_006.phpt new file mode 100755 index 0000000000..bb2be7e045 --- /dev/null +++ b/ext/pdo_firebird/tests/pdo_006.phpt @@ -0,0 +1,64 @@ +--TEST-- +PDO_Firebird: PDO_FETCH_GROUP +--SKIPIF-- + +--FILE-- + +===DONE=== + +--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=== diff --git a/ext/pdo_firebird/tests/pdo_007.phpt b/ext/pdo_firebird/tests/pdo_007.phpt new file mode 100755 index 0000000000..6e286fe945 --- /dev/null +++ b/ext/pdo_firebird/tests/pdo_007.phpt @@ -0,0 +1,52 @@ +--TEST-- +PDO_Firebird: PDO_FETCH_UNIQUE +--SKIPIF-- + +--FILE-- + +===DONE=== + +--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=== diff --git a/ext/pdo_firebird/tests/pdo_008.phpt b/ext/pdo_firebird/tests/pdo_008.phpt new file mode 100755 index 0000000000..2360d1c160 --- /dev/null +++ b/ext/pdo_firebird/tests/pdo_008.phpt @@ -0,0 +1,30 @@ +--TEST-- +PDO_Firebird: PDO_FETCH_UNIQUE conflict +--SKIPIF-- + +--FILE-- + +===DONE=== + +--EXPECTF-- +array(2) { + ["A"]=> + array(1) { + [0]=> + string(3) "B " + } + ["C"]=> + array(1) { + [0]=> + string(3) "C " + } +} +===DONE=== diff --git a/ext/pdo_firebird/tests/pdo_009.phpt b/ext/pdo_firebird/tests/pdo_009.phpt new file mode 100755 index 0000000000..b19c2df29b --- /dev/null +++ b/ext/pdo_firebird/tests/pdo_009.phpt @@ -0,0 +1,89 @@ +--TEST-- +PDO_Firebird: PDO_FETCH_CLASSTYPE +--SKIPIF-- + +--FILE-- + +===DONE=== + +--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=== diff --git a/ext/pdo_firebird/tests/pdo_010.phpt b/ext/pdo_firebird/tests/pdo_010.phpt new file mode 100755 index 0000000000..c691bda9ee --- /dev/null +++ b/ext/pdo_firebird/tests/pdo_010.phpt @@ -0,0 +1,76 @@ +--TEST-- +PDO_Firebird: PDO_FETCH_(CLASSTYPE and GROUP/UNIQUE) +--SKIPIF-- + +--FILE-- + +===DONE=== + +--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=== diff --git a/ext/pdo_firebird/tests/pdo_011.phpt b/ext/pdo_firebird/tests/pdo_011.phpt new file mode 100755 index 0000000000..68dd826ccb --- /dev/null +++ b/ext/pdo_firebird/tests/pdo_011.phpt @@ -0,0 +1,181 @@ +--TEST-- +PDO_Firebird: PDO_FETCH_FUNC and statement overloading +--SKIPIF-- + +--FILE-- + +===DONE=== + +--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=== diff --git a/ext/pdo_firebird/tests/pdo_012.phpt b/ext/pdo_firebird/tests/pdo_012.phpt new file mode 100755 index 0000000000..176c219488 --- /dev/null +++ b/ext/pdo_firebird/tests/pdo_012.phpt @@ -0,0 +1,70 @@ +--TEST-- +PDO_Firebird: PDOStatement::setFetchMode +--SKIPIF-- + +--FILE-- + +===DONE=== + +--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=== diff --git a/ext/pdo_firebird/tests/pdo_013.phpt b/ext/pdo_firebird/tests/pdo_013.phpt new file mode 100755 index 0000000000..843fac90aa --- /dev/null +++ b/ext/pdo_firebird/tests/pdo_013.phpt @@ -0,0 +1,58 @@ +--TEST-- +PDO_Firebird: PDOStatement is Traversable +--SKIPIF-- + +--FILE-- + +===DONE=== + +--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=== diff --git a/ext/pdo_firebird/tests/pdo_014.phpt b/ext/pdo_firebird/tests/pdo_014.phpt new file mode 100755 index 0000000000..4366e00d46 --- /dev/null +++ b/ext/pdo_firebird/tests/pdo_014.phpt @@ -0,0 +1,50 @@ +--TEST-- +PDO_Firebird: PDOStatement and SPL Iterators +--SKIPIF-- + +--FILE-- + +===DONE=== + +--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=== diff --git a/ext/pdo_firebird/tests/pdo_015.phpt b/ext/pdo_firebird/tests/pdo_015.phpt new file mode 100755 index 0000000000..85819b6901 --- /dev/null +++ b/ext/pdo_firebird/tests/pdo_015.phpt @@ -0,0 +1,77 @@ +--TEST-- +PDO_Firebird: PDO_FETCH_COLUMN +--SKIPIF-- + +--FILE-- + +===DONE=== + +--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=== diff --git a/ext/pdo_firebird/tests/pdo_019.phpt b/ext/pdo_firebird/tests/pdo_019.phpt new file mode 100755 index 0000000000..a9a65cf853 --- /dev/null +++ b/ext/pdo_firebird/tests/pdo_019.phpt @@ -0,0 +1,52 @@ +--TEST-- +PDO_Firebird: fetch() and while() +--SKIPIF-- + +--FILE-- + +===DONE=== + +--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=== diff --git a/ext/pdo_firebird/tests/pdo_020.phpt b/ext/pdo_firebird/tests/pdo_020.phpt new file mode 100755 index 0000000000..c6546613b1 --- /dev/null +++ b/ext/pdo_firebird/tests/pdo_020.phpt @@ -0,0 +1,21 @@ +--TEST-- +PDO_Firebird: PDOStatement::columnCount +--SKIPIF-- + +--FILE-- + +===DONE=== + +--EXPECT-- +Counted 2 columns after select1. +Counted 3 columns after select2. +Counted 1 columns after select3. +===DONE=== diff --git a/ext/pdo_firebird/tests/pdo_021.phpt b/ext/pdo_firebird/tests/pdo_021.phpt new file mode 100755 index 0000000000..c2089f6fae --- /dev/null +++ b/ext/pdo_firebird/tests/pdo_021.phpt @@ -0,0 +1,20 @@ +--TEST-- +PDO_Firebird: PDOStatement::execute with parameter markers. +--SKIPIF-- + +--FILE-- + +===DONE=== + +--EXPECT-- +There are 6 rows in the table. +There are 12 rows in the table. +===DONE=== diff --git a/ext/pdo_firebird/tests/prepare.inc b/ext/pdo_firebird/tests/prepare.inc new file mode 100755 index 0000000000..f243e5c38b --- /dev/null +++ b/ext/pdo_firebird/tests/prepare.inc @@ -0,0 +1,15 @@ +query('DROP TABLE test'); +$DB->query('DROP TABLE classtypes'); + +$DB->setAttribute(PDO_ATTR_ERRMODE, PDO_ERRMODE_WARNING); +$DB->setAttribute(PDO_ATTR_CASE, PDO_CASE_LOWER); + +?> -- 2.40.0