我的设置是这样的:如何运行PHPUnit的测试与它的依赖
class MyTest extends PHPUnit_Framework_TestCase
{
// More tests before
public function testOne()
{
// Assertions
return $value;
}
/**
* @depends testOne
*/
public function testTwo($value)
{
// Assertions
}
// More tests after
}
我想专注于testTwo但是当我做phpunit --filter testTwo
我得到的消息是这样的:
This test depends on "MyTest::testOne" to pass.
No tests executed!
我的问题:有没有办法运行一个测试及其所有的依赖关系?
更为可惜,有没有简单的方法来做到这一点!组可以工作,但需要与经常要测试的路径一样多的组 - 结束于* n *组中的重要依赖项,其中* n *是依赖测试的数目。这是一团糟,应该有一个更简单的方法!我[提出了一个建议](https://github.com/sebastianbergmann/phpunit/issues/2166) – artfulrobot 2016-05-16 11:35:33