You are here

public function PHPUnit_Framework_Constraint_And::setConstraints in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/src/Framework/Constraint/And.php \PHPUnit_Framework_Constraint_And::setConstraints()

Parameters

PHPUnit_Framework_Constraint[] $constraints:

Throws

PHPUnit_Framework_Exception

File

vendor/phpunit/phpunit/src/Framework/Constraint/And.php, line 32

Class

PHPUnit_Framework_Constraint_And
Logical AND.

Code

public function setConstraints(array $constraints) {
  $this->constraints = array();
  foreach ($constraints as $constraint) {
    if (!$constraint instanceof PHPUnit_Framework_Constraint) {
      throw new PHPUnit_Framework_Exception('All parameters to ' . __CLASS__ . ' must be a constraint object.');
    }
    $this->constraints[] = $constraint;
  }
}