You are here

public function PHPUnit_Extensions_RepeatedTest::__construct in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/phpunit/phpunit/src/Extensions/RepeatedTest.php \PHPUnit_Extensions_RepeatedTest::__construct()

Parameters

PHPUnit_Framework_Test $test:

int $timesRepeat:

bool $processIsolation:

Throws

PHPUnit_Framework_Exception

Overrides PHPUnit_Extensions_TestDecorator::__construct

File

vendor/phpunit/phpunit/src/Extensions/RepeatedTest.php, line 34

Class

PHPUnit_Extensions_RepeatedTest
A Decorator that runs a test repeatedly.

Code

public function __construct(PHPUnit_Framework_Test $test, $timesRepeat = 1, $processIsolation = false) {
  parent::__construct($test);
  if (is_integer($timesRepeat) && $timesRepeat >= 0) {
    $this->timesRepeat = $timesRepeat;
  }
  else {
    throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'positive integer');
  }
  $this->processIsolation = $processIsolation;
}