PHPUnit:忽略testSuite

时间:2015-05-31 18:49:52

标签: phpunit

我正在尝试测试除特定文件夹中的一个目录之外的所有目录。我现在的树:

app/code/My/Module/Test/SomeTest.php
app/code/Magento/Admin/Test/SomeTest.php
app/code/Other/Module/Test/AnotherTest.php

我需要运行所有测试,但需要在app/code/Magento目录中运行。到目前为止我尝试过的:

<testsuite name="Modules Tests">
    <directory suffix=".php">app/code/*/*/Test</directory>
    <exclude>app/code/Magento</exclude>
</testsuite>

即使使用带有绝对路径的排除项或通配符app/code/Magento/*,它们仍会被添加到testsuite中。也试过黑名单,但似乎也被忽略了。

我正在使用PHPUnit 4.6.4。

这里有什么建议吗?

谢谢!

1 个答案:

答案 0 :(得分:-1)

请参见工作示例here。 另外,根据链接中的注释,“如果在命令行中添加了路径,则会忽略“排除”。

相关问题