PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » MDB2 » Bug #10188

Unit tests fail under PHP4

Details

Submitted2007-02-26 11:58 UTC
Fromandrew dot hill at openads dot org
Assignedquipo
StatusBogus
PackageMDB2
PHP Version4.3.11
OSCentos 4.3, Apache 1.3
Roadmaps(Not assigned)

Comments

[2007-02-26 11:58 UTC] andrew dot hill at openads dot org

Description:
------------
When running the PHPUnit tests with PHPUnit 1.3.2, the following error is output:

Parse error: parse error, unexpected '=', expecting ')' in /path/to/MDB2/tests/MDB2_internals_testcase.php on line 246

Test script:
---------------
Patch:

--- MDB2/tests/MDB2_internals_testcase.php (revision 4657)
+++ MDB2/tests/MDB2_internals_testcase.php (working copy)
@@ -243,7 +243,7 @@
);
}

- function test__fixResultArrayValues_EmptyToNull(&$row='', $mode='', $sender='_fixResultArrayValues_EmptyToNull')
+ function test__fixResultArrayValues_EmptyToNull($row='', $mode='', $sender='_fixResultArrayValues_EmptyToNull')
{
$row = (!$row ? $this->fetchRowData() : $row );
$mode = (!$mode ? MDB2_PORTABILITY_EMPTY_TO_NULL : $mode );
@@ -256,7 +256,7 @@
$this->assertNotNull($row[1], $sender);
}

- function test__fixResultArrayValues_Rtrim(&$row='', $mode='', $sender='_fixResultArrayValues_Rtrim')
+ function test__fixResultArrayValues_Rtrim($row='', $mode='', $sender='_fixResultArrayValues_Rtrim')
{
$row = (!$row ? $this->fetchRowData() : $row );
$mode = (!$mode ? MDB2_PORTABILITY_RTRIM : $mode );
@@ -268,7 +268,7 @@
$this->assertEquals(7, strlen($row[2]),$sender);
}

- function test__fixResultArrayValues_AssocFieldNames(&$row='', $mode='', $sender='_fixResultArrayValues_AssocFieldNames')
+ function test__fixResultArrayValues_AssocFieldNames($row='', $mode='', $sender='_fixResultArrayValues_AssocFieldNames')
{
$row = (!$row ? $this->fetchRowData() : $row );
$mode = (!$mode ? MDB2_PORTABILITY_FIX_ASSOC_FIELD_NAMES : $mode );