You are here

public function PHPUnit_Framework_Constraint_StringContains::toString in Zircon Profile 8

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

Returns a string representation of the constraint.

Return value

string

Overrides PHPUnit_Framework_SelfDescribing::toString

File

vendor/phpunit/phpunit/src/Framework/Constraint/StringContains.php, line 67

Class

PHPUnit_Framework_Constraint_StringContains
Constraint that asserts that the string it is evaluated for contains a given string.

Code

public function toString() {
  if ($this->ignoreCase) {
    $string = strtolower($this->string);
  }
  else {
    $string = $this->string;
  }
  return sprintf('contains "%s"', $string);
}