matches() публичный Метод

Checks if the specified method matches with the method annotation filter pattern
public matches ( string $className, string $methodName, string $methodDeclaringClassName, mixed $pointcutQueryIdentifier ) : boolean
$className string Name of the class to check against - not used here
$methodName string Name of the method
$methodDeclaringClassName string Name of the class the method was originally declared in
$pointcutQueryIdentifier mixed Some identifier for this query - must at least differ from a previous identifier. Used for circular reference detection - not used here
Результат boolean TRUE if the class matches, otherwise FALSE
 /**
  * @test
  */
 public function matchesReturnsFalseIfMethodDoesNotExistOrDeclardingClassHasNotBeenSpecified()
 {
     $mockReflectionService = $this->createMock(ReflectionService::class, [], [], '', false, true);
     $filter = new Aop\Pointcut\PointcutMethodAnnotatedWithFilter('Acme\\Some\\Annotation');
     $filter->injectReflectionService($mockReflectionService);
     $this->assertFalse($filter->matches(__CLASS__, __FUNCTION__, null, 1234));
     $this->assertFalse($filter->matches(__CLASS__, 'foo', __CLASS__, 1234));
 }