PHPUnit XDebug required
Posted
by poru
on Stack Overflow
See other posts from Stack Overflow
or by poru
Published on 2010-05-02T12:13:58Z
Indexed on
2010/05/02
12:17 UTC
Read the original article
Hit count: 980
Hello,
I finished installation of PHPUnit, it works but I don't get a code coverage report. I'm working on windows. My phpunit.xml
<phpunit bootstrap="./application/bootstrap.php" colors="false">
<testsuite name="Application">
<directory>./</directory>
</testsuite>
<filter>
<whitelist>
<directory suffix=".php">./application</directory>
<directory suffix=".php">./library/Application</directory>
<exclude>
<directory suffix=".php">../application/libraries/Zend</directory>
<directory suffix=".php">../application/controllers</directory>
<directory suffix=".phtml">./application/</directory>
<file>./application/Bootstrap.php</file>
</exclude>
</whitelist>
</filter>
<logging>
<log type="coverage-html" target="./log/report" charset="UTF-8" yui="true" highlight="true" lowUpperBound="50" highLowerBound="80" />
<log type="testdox" target="./log/testdox.html" />
</logging>
If I run on cmd phpunit --configuration phpunit.xml
it works so far, but PHPUnit doesn't create a code coverage report.
If I run
phpunit --configuration phpunit.xml --coverage-html \log
or
phpunit --configuration phpunit.xml --coverage-html log
I get the error The Xdebug extension is not loaded.
But I installed it (version 2.0.5)!
phpinfo() says I installed it, also var_dump(extension_loaded('xdebug'))
I get true.
I installed it as Zend Extension and I tried also as normal extension.
Bot worked, but PHPUnit says everytime Xdebug is not loaded!
© Stack Overflow or respective owner