public function PHPUnit_Framework_Constraint_Or::setConstraints in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/src/Framework/Constraint/Or.php \PHPUnit_Framework_Constraint_Or::setConstraints()
Parameters
PHPUnit_Framework_Constraint[] $constraints:
File
- vendor/
phpunit/ phpunit/ src/ Framework/ Constraint/ Or.php, line 26
Class
- PHPUnit_Framework_Constraint_Or
- Logical OR.
Code
public function setConstraints(array $constraints) {
$this->constraints = array();
foreach ($constraints as $constraint) {
if (!$constraint instanceof PHPUnit_Framework_Constraint) {
$constraint = new PHPUnit_Framework_Constraint_IsEqual($constraint);
}
$this->constraints[] = $constraint;
}
}