[英]phpunit + Symfony2: There is no message specifying which tests are failing
當我運行phpunit -c app時,輸出為:
PHPUnit 5.1.3 by Sebastian Bergmann and contributors.
WF.FFF.............. 20 / 20
(100%)
Time: 19.65 seconds, Memory: 18.00Mb
There was 1 warning:
1) Warning
No tests found in class "Sheik\RobotBundle\Tests\Controller\CrawlerControllerTest".
WARNINGS!
Tests: 20, Assertions: 21, Failures: 4, Warnings: 1.
我正在Ubuntu 16.04中使用Symfony 2.5。 在更新到Ubuntu 16.04之前,每個失敗都會有一條消息,指出哪個測試失敗。
這是我的app / phpunit.xml.dist:
<?xml version="1.0" encoding="UTF-8"?>
<!-- http://phpunit.de/manual/current/en/appendixes.configuration.html -->
<phpunit
backupGlobals = "false"
backupStaticAttributes = "false"
colors = "true"
convertErrorsToExceptions = "true"
convertNoticesToExceptions = "true"
convertWarningsToExceptions = "true"
processIsolation = "false"
stopOnFailure = "false"
syntaxCheck = "false"
bootstrap = "bootstrap.php.cache" >
<testsuites>
<testsuite name="Project Test Suite">
<directory>../src/*/*Bundle/Tests</directory>
<directory>../src/*/Bundle/*Bundle/Tests</directory>
</testsuite>
</testsuites>
<!--
<php>
<server name="KERNEL_DIR" value="/path/to/your/app/" />
</php>
-->
<filter>
<whitelist>
<directory>../src</directory>
<exclude>
<directory>../src/*/*Bundle/Resources</directory>
<directory>../src/*/*Bundle/Tests</directory>
<directory>../src/*/Bundle/*Bundle/Resources</directory>
<directory>../src/*/Bundle/*Bundle/Tests</directory>
</exclude>
</whitelist>
</filter>
</phpunit>
我在另一個問題中嘗試了提示: PHPUnit問題-沒有錯誤消息,但error_reporting已經設置為E_ALL | 在我的php.ini中將E_STRICT和display_errors設置為On。
我會感激任何其他暗示或提示。
僅作記錄,也許可以使用phpunit -c app src/yourVendor/yourBundle/Tests/
將顯示通往失敗測試的每條路線的失敗消息。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.