【发布时间】:2011-10-26 03:02:41
【问题描述】:
我的 phpunit.xml 文件中有这个:
<phpunit ...>
<testsuites>
<testsuite name="MyTests">
<directory>../path/to/some/tests</directory>
</testsuite>
</testsuites>
... // more settings for <filter> and <logging>
</phpunit>
当我去运行它时,我得到了这个错误:
PHP fatal error: Uncaught exception 'PHPUnit_Framework_Exception'
with message 'Neither "MyTests.php" nor "MyTests.php" could be opened.'
为什么 PHPUnit 会给我这个错误,如果我给它一个目录来查找测试,为什么它会寻找“MyTests.php”?
在相关说明中,当我在其他测试中添加更多 <testsuite> 条目时,PHPUnit 运行时不会出错。这是怎么回事?
【问题讨论】:
标签: php unit-testing testing phpunit