Ticket #415 (closed defect: duplicate)
PHPUnit with formatter type xml ends in E_FATAL
| Reported by: | sven.strittmatter@… | Owned by: | mrook |
|---|---|---|---|
| Priority: | low | Milestone: | 2.4.0 |
| Component: | phing-tasks-phpunit | Version: | 2.3.3 |
| Keywords: | Cc: |
Description
I use a target like this: <phpunit>
<formatter todir="${reports}/tests" type="xml" /> <batchtest>
<fileset refid="tests" />
</batchtest>
</phpunit>
This ends up in: [PHP Error] require_once(PHPUnit/Util/Log/XML.php): failed to open stream: No such file or directory [line 22 of /usr/lib/php/phing/tasks/ext/phpunit/phpunit3/XMLPHPUnit3ResultFormatter.php]
In current version of PHPUnit there is no PHPUnit_Util_Log_XML but there is a PHPUnit_Util_Log_JUnit.
A quickfix which works for me fine is to change in line 22 of /usr/lib/php/phing/tasks/ext/phpunit/phpunit3/XMLPHPUnit3ResultFormatter.php the require_once 'PHPUnit/Util/Log/XML.php'; to require_once 'PHPUnit/Util/Log/JUnit.php';
My system configuration: Mac OS 10.6 PHP 5.3.0 with Xdebug 2.0.5 Phing 2.3.3 PHPUnit 3.4.6

Please use the ticket search prior to submitting a new ticket, this issue was reported as #363 and is fixed in release 2.4.0RC2.