You are here

public function PHPUnit_Framework_Constraint_Xor::toString in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/src/Framework/Constraint/Xor.php \PHPUnit_Framework_Constraint_Xor::toString()

Returns a string representation of the constraint.

Return value

string

Overrides PHPUnit_Framework_SelfDescribing::toString

File

vendor/phpunit/phpunit/src/Framework/Constraint/Xor.php, line 88

Class

PHPUnit_Framework_Constraint_Xor
Logical XOR.

Code

public function toString() {
  $text = '';
  foreach ($this->constraints as $key => $constraint) {
    if ($key > 0) {
      $text .= ' xor ';
    }
    $text .= $constraint
      ->toString();
  }
  return $text;
}