ユニットテストZend Framework
アプリケーションでロープを学習しています。これまで私はZend Framework
で動作するようにPHPUnit
を設定し、いくつかの簡単なテストケースを書き始めました。PHPUnitコードカバレッジ
私の問題は、私がphpunit.xml
のロギングタグに設定されているにもかかわらず、なぜCode Coverage
が機能しないのでしょうかということです。
エラーは発生しませんが、カバレッジレポートは生成されません。
私はphpunit --coverage <dir>
を実行すると、それは動作しますが、私はPHPUnitのログセクションは以下の通りです:
<phpunit bootstrap="./application/bootstrap.php" colors="true">
<testsuite name="CI Test Suite">
<directory>./</directory>
</testsuite>
<testsuite name="Library Test Suite">
<directory>./library</directory>
</testsuite>
<filter>
<whitelist>
<directory suffix=".php">../application/</directory>
<exclude>
<directory suffix=".phtml">../application</directory>
<file>../application/Bootstrap.php</file>
<file>../application/controllers/ErrorController.php</file>
</exclude>
</whitelist>
<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>
</filter>
</phpunit>
誰でもこの前に遭遇?何が問題になるのでしょうか?
私のログはフィルタ内にネストされていません。少し違いがあるかもしれません。 –