implemented support for PHPUnit's @depends

This commit is contained in:
Adrian Nürnberger
2020-06-19 19:50:54 +02:00
parent 283d8f3e03
commit d0a74931dd
7 changed files with 120 additions and 12 deletions

View File

@ -84,6 +84,20 @@ final class TestCall
return $this;
}
public function dependsOn(string ...$tests): TestCall
{
$this->testCaseFactory
->factoryProxies
->add(Backtrace::file(), Backtrace::line(), 'addDependencies', [$tests]);
return $this;
}
public function depends(string ...$tests): TestCall
{
return $this->dependsOn(...$tests);
}
/**
* Makes the test suite only this test case.
*/