Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ObjectHasProperty.php

function ObjectHasProperty::matches

Evaluates the constraint for parameter $other. Returns true if the constraint is met, false otherwise.

Parameters

mixed $other value or object to evaluate:

Overrides Constraint::matches

File

vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasProperty.php, line 46

Class

ObjectHasProperty
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

Namespace

PHPUnit\Framework\Constraint

Code

protected function matches(mixed $other) : bool {
    if (!is_object($other)) {
        return false;
    }
    return (new ReflectionObject($other))->hasProperty($this->propertyName);
}
RSS feed
Powered by Drupal