Skip to content

Instantly share code, notes, and snippets.

@fasthold
Created February 16, 2011 10:01
Show Gist options
  • Save fasthold/829118 to your computer and use it in GitHub Desktop.
Save fasthold/829118 to your computer and use it in GitHub Desktop.
zend framework phpunit configuration
<phpunit bootstrap="./TestHelper.php" colors="true">
<!-- Version: $Id$ -->
<testsuite name="Zend Framework Unit Test Demo">
<directory>./</directory>
</testsuite>
<filter>
<whitelist>
<directory suffix=".php">../library/</directory>
<directory suffix=".php">../application/</directory>
<exclude>
<directory suffix=".phtml">../application/</directory>
</exclude>
</whitelist>
</filter>
<logging>
<!-- <log type="coverage-html" target="./logs/report" charset="UTF-8"
yui="true" highlight="true" lowUpperBound="50" highLowerBound="80"/> --> <!-- 取消注释此行,即启用 CodeCoverage -->
<log type="testdox-html" target="./logs/testdox.html" />
</logging>
</phpunit>
@fasthold
Copy link
Author

指令:
phpunit --configuration phpunit.xml

如果是指定测试某一个controller,则使用:

phpunit --configuration phpunit.xml /path/to/basedir/tests/controller/SomeControllerTest.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment