Use TestDecorator as the base class for defining new test decorators. Test decorator subclasses can be introduced to add behaviour before or after a test is run.
Author: Sebastian Bergmann (sebastian@phpunit.de)
Inheritance: extends PHPUnit_Framework_Assert, implements PHPUnit_Framework_Test, implements PHPUnit_Framework_SelfDescribing
Exemple #1
0
 /**
  * Constructor.
  *
  * @param  PHPUnit_Framework_Test $test
  * @param  integer                 $timesRepeat
  * @throws InvalidArgumentException
  * @access public
  */
 public function __construct(PHPUnit_Framework_Test $test, $timesRepeat = 1)
 {
     parent::__construct($test);
     if (is_integer($timesRepeat) && $timesRepeat >= 0) {
         $this->timesRepeat = $timesRepeat;
     } else {
         throw new InvalidArgumentException('Argument 2 must be a positive integer.');
     }
 }
Exemple #2
0
 /**
  * @param  PHPUnit_Framework_Test      $test
  * @param  int                         $timesRepeat
  * @param  bool                        $processIsolation
  * @throws PHPUnit_Framework_Exception
  */
 public function __construct(PHPUnit_Framework_Test $test, int $timesRepeat = 1, $processIsolation = false)
 {
     if ($timesRepeat < 1) {
         throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'positive integer');
     }
     parent::__construct($test);
     $this->timesRepeat = $timesRepeat;
     $this->processIsolation = $processIsolation;
 }
 /**
  * @param  PHPUnit_Framework_Test      $test
  * @param  int                         $timesRepeat
  * @param  bool                        $processIsolation
  * @throws PHPUnit_Framework_Exception
  */
 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;
 }
Exemple #4
0
 /**
  * Constructor.
  *
  * @param  PHPUnit_Framework_Test $test
  * @param  integer                $timesRepeat
  * @param  mixed                  $filter
  * @param  array                  $groups
  * @param  array                  $excludeGroups
  * @param  boolean                $processIsolation
  * @throws InvalidArgumentException
  */
 public function __construct(PHPUnit_Framework_Test $test, $timesRepeat = 1, $filter = FALSE, array $groups = array(), array $excludeGroups = array(), $processIsolation = FALSE)
 {
     parent::__construct($test);
     if (is_integer($timesRepeat) && $timesRepeat >= 0) {
         $this->timesRepeat = $timesRepeat;
     } else {
         throw new InvalidArgumentException('Argument 2 must be a positive integer.');
     }
     $this->filter = $filter;
     $this->groups = $groups;
     $this->excludeGroups = $excludeGroups;
     $this->processIsolation = $processIsolation;
 }
 /**
  * Constructor.
  *
  * @param  PHPUnit_Framework_Test $test
  * @param  integer                $timesRepeat
  * @param  mixed                  $filter
  * @param  array                  $groups
  * @param  array                  $excludeGroups
  * @param  boolean                $processIsolation
  * @throws InvalidArgumentException
  */
 public function __construct(PHPUnit_Framework_Test $test, $timesRepeat = 1, $filter = FALSE, array $groups = array(), array $excludeGroups = array(), $processIsolation = FALSE)
 {
     parent::__construct($test);
     if (is_integer($timesRepeat) && $timesRepeat >= 0) {
         $this->timesRepeat = $timesRepeat;
     } else {
         throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'positive integer');
     }
     $this->filter = $filter;
     $this->groups = $groups;
     $this->excludeGroups = $excludeGroups;
     $this->processIsolation = $processIsolation;
 }
Exemple #6
0
 /**
  * Constructor.
  *
  * @param  PHPUnit_Framework_Test  $test
  * @param  integer                 $timesRepeat
  * @access public
  */
 public function __construct(PHPUnit_Framework_Test $test, $timesRepeat = 1)
 {
     parent::__construct($test);
     $this->timesRepeat = $timesRepeat;
 }