protected function PHPUnit_Framework_Constraint_ArraySubset::matches in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php \PHPUnit_Framework_Constraint_ArraySubset::matches()
Evaluates the constraint for parameter $other. Returns true if the constraint is met, false otherwise.
Parameters
array|ArrayAccess $other Array or ArrayAccess object to evaluate.:
Return value
bool
Overrides PHPUnit_Framework_Constraint::matches
File
- vendor/
phpunit/ phpunit/ src/ Framework/ Constraint/ ArraySubset.php, line 49
Class
- PHPUnit_Framework_Constraint_ArraySubset
- Constraint that asserts that the array it is evaluated for has a specified subset.
Code
protected function matches($other) {
$patched = array_replace_recursive($other, $this->subset);
if ($this->strict) {
return $other === $patched;
}
else {
return $other == $patched;
}
}