public function PHPUnit_Extensions_RepeatedTest::run in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/src/Extensions/RepeatedTest.php \PHPUnit_Extensions_RepeatedTest::run()
Runs the decorated test and collects the result in a TestResult.
Parameters
PHPUnit_Framework_TestResult $result:
Return value
Throws
Overrides PHPUnit_Extensions_TestDecorator::run
File
- vendor/
phpunit/ phpunit/ src/ Extensions/ RepeatedTest.php, line 70
Class
- PHPUnit_Extensions_RepeatedTest
- A Decorator that runs a test repeatedly.
Code
public function run(PHPUnit_Framework_TestResult $result = null) {
if ($result === null) {
$result = $this
->createResult();
}
//@codingStandardsIgnoreStart
for ($i = 0; $i < $this->timesRepeat && !$result
->shouldStop(); $i++) {
//@codingStandardsIgnoreEnd
if ($this->test instanceof PHPUnit_Framework_TestSuite) {
$this->test
->setRunTestInSeparateProcess($this->processIsolation);
}
$this->test
->run($result);
}
return $result;
}