Last active
August 29, 2015 13:57
-
-
Save naotawool/9366507 to your computer and use it in GitHub Desktop.
PHPUnit + カバレッジ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<phpunit | |
bootstrap="bootstrap.php" | |
colors="true" | |
convertErrorsToExceptions="true" | |
convertNoticesToExceptions="true" | |
convertWarningsToExceptions="true" | |
forceCoversAnnotation="true" | |
stopOnError="false" | |
stopOnFailure="false" | |
stopOnSkipped="false" | |
stopOnIncomplete="false"> | |
<!-- | |
カバレッジ出力フィルタ | |
指定されているディレクトリのクラスのみカバレッジ出力される | |
--> | |
<filter> | |
<whitelist addUncoveredFilesFromWhitelist="true"> | |
<directory suffix=".php">../components</directory> | |
<directory suffix=".php">../controllers</directory> | |
<directory suffix=".php">../models</directory> | |
<exclude> | |
<directory suffix=".php">../config</directory><!-- 除外 --> | |
</exclude> | |
</whitelist> | |
</filter> | |
<testsuites> | |
<testsuite name="ComponentsTest"> | |
<directory>unit/components</directory> | |
</testsuite> | |
<testsuite name="ModelsTest"> | |
<directory>unit/models</directory> | |
</testsuite> | |
<testsuite name="ControllersTest"> | |
<directory>unit/controllers</directory> | |
</testsuite> | |
</testsuites> | |
<!-- | |
ログ設定 | |
coverage-html:カバレッジをHTMLで出力 | |
coverage-clover:テスト結果からXML形式のログファイルを生成 | |
coverage-text:プロンプトにカバレッジ率を出力 | |
--> | |
<logging> | |
<log type="coverage-html" target="report" | |
charset="UTF-8" yui="true" highlight="false" lowUpperBound="30" highLowerBound="80"/> | |
<log type="coverage-text" target="php://stdout" lowUpperBound="30" highLowerBound="80"/> | |
</logging> | |
</phpunit> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment