protected function PHPUnit_Framework_Constraint_ClassHasAttribute::matches in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php \PHPUnit_Framework_Constraint_ClassHasAttribute::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
2 methods override PHPUnit_Framework_Constraint_ClassHasAttribute::matches()
- PHPUnit_Framework_Constraint_ClassHasStaticAttribute::matches in vendor/
phpunit/ phpunit/ src/ Framework/ Constraint/ ClassHasStaticAttribute.php - Evaluates the constraint for parameter $other. Returns true if the constraint is met, false otherwise.
- PHPUnit_Framework_Constraint_ObjectHasAttribute::matches in vendor/
phpunit/ phpunit/ src/ Framework/ Constraint/ ObjectHasAttribute.php - Evaluates the constraint for parameter $other. Returns true if the constraint is met, false otherwise.
File
- vendor/
phpunit/ phpunit/ src/ Framework/ Constraint/ ClassHasAttribute.php, line 42
Class
- PHPUnit_Framework_Constraint_ClassHasAttribute
- Constraint that asserts that the class it is evaluated for has a given attribute.
Code
protected function matches($other) {
$class = new ReflectionClass($other);
return $class
->hasProperty($this->attributeName);
}