【发布时间】:2013-04-03 19:15:09
【问题描述】:
PHPunit 无法找到我的测试,但它确实找到了我的 XML 配置。这是配置:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
>
<testsuites>
<testsuite name="Symply Test Suite">
<directory>src/Symply/EventManager/Tests</directory>
</testsuite>
</testsuites>
</phpunit>
这是目录结构:
PHPunit 只是说,在运行脚本时,“没有执行测试”。 我不知道为什么这不起作用,因为我在 XML 目录标签中指定了目录。
【问题讨论】:
-
能否也发布 EventManagerTest.php 文件?
-
是的!其实没什么特别的:pastebin.com/mtnhGD4D
-
我看不到发布的代码有任何问题,但我没有使用 PHP 命名空间,所以我不能说。您是否尝试过将 php.ini 中的日志记录设置为尽可能多,并将 display_errors 设置为 on?
标签: unit-testing phpunit