Neos\Flow\Tests\Unit\Aop\Pointcut\PointcutExpressionParserTest::parseCallsSpecializedMethodsToParseEachDesignator PHP Метод

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

    public function parseCallsSpecializedMethodsToParseEachDesignator()
    {
        $mockMethods = ['parseDesignatorPointcut', 'parseDesignatorClassAnnotatedWith', 'parseDesignatorClass', 'parseDesignatorMethodAnnotatedWith', 'parseDesignatorMethod', 'parseDesignatorWithin', 'parseDesignatorFilter', 'parseDesignatorSetting', 'parseRuntimeEvaluations'];
        $parser = $this->getMockBuilder(PointcutExpressionParser::class)->setMethods($mockMethods)->disableOriginalConstructor()->getMock();
        $parser->expects($this->once())->method('parseDesignatorPointcut')->with('&&', '\\Foo\\Bar->baz');
        $parser->expects($this->once())->method('parseDesignatorClassAnnotatedWith')->with('&&', Flow\Aspect::class);
        $parser->expects($this->once())->method('parseDesignatorClass')->with('&&', 'Foo');
        $parser->expects($this->once())->method('parseDesignatorMethodAnnotatedWith')->with('&&', Flow\Session::class);
        $parser->expects($this->once())->method('parseDesignatorMethod')->with('&&', 'Foo->Bar()');
        $parser->expects($this->once())->method('parseDesignatorWithin')->with('&&', 'Bar');
        $parser->expects($this->once())->method('parseDesignatorFilter')->with('&&', '\\Foo\\Bar\\Baz');
        $parser->expects($this->once())->method('parseDesignatorSetting')->with('&&', 'Foo.Bar.baz');
        $parser->expects($this->once())->method('parseRuntimeEvaluations')->with('&&', 'Foo.Bar.baz == "test"');
        $parser->parse('\\Foo\\Bar->baz', 'Unit Test');
        $parser->parse('classAnnotatedWith(Neos\\Flow\\Annotations\\Aspect)', 'Unit Test');
        $parser->parse('class(Foo)', 'Unit Test');
        $parser->parse('methodAnnotatedWith(Neos\\Flow\\Annotations\\Session)', 'Unit Test');
        $parser->parse('method(Foo->Bar())', 'Unit Test');
        $parser->parse('within(Bar)', 'Unit Test');
        $parser->parse('filter(\\Foo\\Bar\\Baz)', 'Unit Test');
        $parser->parse('setting(Foo.Bar.baz)', 'Unit Test');
        $parser->parse('evaluate(Foo.Bar.baz == "test")', 'Unit Test');
    }