protected function PHPUnit_Framework_Constraint_StringContains::matches in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/src/Framework/Constraint/StringContains.php \PHPUnit_Framework_Constraint_StringContains::matches()
Evaluates the constraint for parameter $other. Returns true if the constraint is met, false otherwise.
Parameters
mixed $other Value or object to evaluate.:
Return value
bool
Overrides PHPUnit_Framework_Constraint::matches
File
- vendor/
phpunit/ phpunit/ src/ Framework/ Constraint/ StringContains.php, line 53
Class
- PHPUnit_Framework_Constraint_StringContains
- Constraint that asserts that the string it is evaluated for contains a given string.
Code
protected function matches($other) {
if ($this->ignoreCase) {
return stripos($other, $this->string) !== false;
}
else {
return strpos($other, $this->string) !== false;
}
}