PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Testing » PHPUnit2 » Bug #6272

Undefined index: failures in ResultPrinter.php

Details

Submitted2005-12-17 06:11 UTC
Frommarkboylan at hotmail dot com
Assignedsebastian
StatusClosed
PackagePHPUnit2
PHP Version5.0.5
OSWinXP
Roadmaps(Not assigned)

Comments

[2005-12-17 06:11 UTC] markboylan at hotmail dot com

Description:
------------
I'm not sure if it's a bug or if I'm doing something wrong but whenever I use one of the --testdox switches I get this error:

Notice: Undefined index: failures in c:\PHP\PEAR\PHPUnit2\Util\TestDox\ResultPr
inter.php on line 240
PHP Notice: Undefined index: failures in c:\PHP\PEAR\PHPUnit2\Util\TestDox\Res
ultPrinter.php on line 240

for each test.

when I change the code from this:

if ($data['failures'] == 0) {
$this->onTest($name);
}

to this:

if ($data['failure'] == 0) {
$this->onTest($name);
}

The error stops, but I still don't seem to get a full report.

Expected result:
----------------
I have 13 tests. 2 fail. only the 11 that pass are listed in the testdox. There are no other details. The tests themselves seem to run fine.

Actual result:
--------------
XhtmlToDomScriptParser
- Parse to java script simple
- Parse to java script one nested
- Parse to java script two nested
- Parse to java script nested nested
- Parse to java script simple with name attribute
- Parse to java script simple with id attribute
- Parse to java script simple with multiple attributes
- Parse to java script simple with child text
- Style attr
- Event handler attr
- Text after b r bug

[2005-12-17 06:45 UTC] sebastian at php dot net

This bug has been fixed in CVS.

If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.

> I still don't seem to get a full report.

Which is correct since the TestDox ResultPrinter only prints Agile Documentation (http://www.phpunit.de/pocket_guide/2.3/en/other-uses-for-tests.html#other-uses-for-tests.agile-documentation).