Neos\Flow\Tests\Unit\Aop\Pointcut\PointcutExpressionParserTest::parseDesignatorClassAnnotatedWithObservesAnnotationPropertyConstraints PHP Method

parseDesignatorClassAnnotatedWithObservesAnnotationPropertyConstraints() public method

    public function parseDesignatorClassAnnotatedWithObservesAnnotationPropertyConstraints()
    {
        $this->mockObjectManager->expects($this->any())->method('get')->will($this->returnValue($this->createMock(SystemLoggerInterface::class)));
        $pointcutFilterComposite = new PointcutFilterComposite();
        $parser = $this->getAccessibleMock(PointcutExpressionParser::class, ['dummy'], [], '', false);
        $parser->injectReflectionService($this->mockReflectionService);
        $parser->injectObjectManager($this->mockObjectManager);
        $parser->_call('parseDesignatorClassAnnotatedWith', '&&', 'foo(bar == FALSE)', $pointcutFilterComposite);
        $expectedAnnotation = 'foo';
        $expectedAnnotationValueConstraints = ['bar' => ['operator' => [0 => '=='], 'value' => [0 => 'FALSE']]];
        $filters = ObjectAccess::getProperty($pointcutFilterComposite, 'filters', true);
        $filter = $filters[0][1];
        $annotation = ObjectAccess::getProperty($filter, 'annotation', true);
        $annotationValueConstraints = ObjectAccess::getProperty($filter, 'annotationValueConstraints', true);
        $this->assertEquals($expectedAnnotation, $annotation);
        $this->assertEquals($expectedAnnotationValueConstraints, $annotationValueConstraints);
    }