public function PHPUnit_Extensions_RepeatedTest::run

Runs the decorated test and collects the result in a TestResult.

Parameters

PHPUnit_Framework_TestResult $result:

Return value

PHPUnit_Framework_TestResult

Throws

PHPUnit_Framework_Exception

Overrides PHPUnit_Extensions_TestDecorator::run

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Extensions/RepeatedTest.php, line 131

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
        ->run($result, $this->filter, $this->groups, $this->excludeGroups, $this->processIsolation);
    }
    else {
      $this->test
        ->run($result);
    }
  }
  return $result;
}