【发布时间】:2016-10-26 17:16:38
【问题描述】:
当我运行测试时,会给出以下警告: 缺少参数 1 ...
unittest通过了,能不能让test失败?
这是我的 PhpUnit.xml
<phpunit bootstrap="bootstrap.php"
colors="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
strict="true">
<selenium>
<browser name="Internet Explorer" browser="*iexplore" />
<browser name="Firefox" browser="*firefox" />
</selenium>
<filter>
<whitelist>
<directory>../src</directory>
</whitelist>
</filter>
<testsuites>
<testsuite name="unitTests">
<directory suffix="Test.php">*</directory>
</testsuite>
</testsuites>
<logging>
<log type="coverage-html" target="../build/coverage" />
<log type="coverage-clover" target="../build/logs/clover.xml" />
<log type="coverage-crap4j" target="../build/logs/crap4j.xml" />
</logging>
</phpunit>
这是 php 日志: xx function() 缺少参数 1,在第 37 行的 xx 中调用并定义(错误类型:第 78 行的 xx 警告)
【问题讨论】: