symfony/symfony — Issue #2651: PHPUnit code coverage reports fail
Author: drak
Created: 2011-11-15 11:04:44+00:00
State: open

When trying to run PHPUnit with --coverage-html, it crashes out with some fatal errors. I have been unable to solve them so I'm opening a ticket.

Writing code coverage data to XML file, this may take a moment.This template isused for translation message extraction tests

Notice: Undefined variable: view in C:\xampp\htdocs\symfony\src\Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Resources\views\translation.html.php on line 2

Call Stack:
0.0004 328656 1. {main}() C:\xampp\php\phpunit:0
0.5237 698448 2. PHPUnit_TextUI_Command::main() C:\xampp\php\phpunit:49
0.5237 698800 3. PHPUnit_TextUI_Command->run() C:\xampp\php\PEAR\PHPUnit\TextUI\Command.php:129
15.6663 81985864 4. PHPUnit_TextUI_TestRunner->doRun() C:\xampp\php\PEAR\PHPUnit\TextUI\Command.php:188
411.1247 292112632 5. PHP_CodeCoverage_Report_Clover->process() C:\xampp\php\PEAR\PHPUnit\TextUI\TestRunner.php:326
411.1248 292113304 6. PHP_CodeCoverage->getSummary() C:\xampp\php\PEAR\PHP\CodeCoverage\Report\Clover.php:87
411.1248 292113304 7. PHP_CodeCoverage->processUncoveredFilesFromWhitelist() C:\xampp\php\PEAR\PHP\CodeCoverage.php:349
411.5495 292363112 8. include_once('C:\xampp\htdocs\symfony\src\Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Resources\views\translation.html.php') C:\xam
pp\php\PEAR\PHP\CodeCoverage.php:592

Fatal error: Call to a member function trans() on a non-object in C:\xampp\htdocs\symfony\src\Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Resources\views\translation.html.php on line 2

Call Stack:
0.0004 328656 1. {main}() C:\xampp\php\phpunit:0
0.5237 698448 2. PHPUnit_TextUI_Command::main() C:\xampp\php\phpunit:49
0.5237 698800 3. PHPUnit_TextUI_Command->run() C:\xampp\php\PEAR\PHPUnit\TextUI\Command.php:129
15.6663 81985864 4. PHPUnit_TextUI_TestRunner->doRun() C:\xampp\php\PEAR\PHPUnit\TextUI\Command.php:188
411.1247 292112632 5. PHP_CodeCoverage_Report_Clover->process() C:\xampp\php\PEAR\PHPUnit\TextUI\TestRunner.php:326
411.1248 292113304 6. PHP_CodeCoverage->getSummary() C:\xampp\php\PEAR\PHP\CodeCoverage\Report\Clover.php:87
411.1248 292113304 7. PHP_CodeCoverage->processUncoveredFilesFromWhitelist() C:\xampp\php\PEAR\PHP\CodeCoverage.php:349
411.5495 292363112 8. include_once('C:\xampp\htdocs\symfony\src\Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Resources\views\translation.html.php') C:\xam
pp\php\PEAR\PHP\CodeCoverage.php:592