Nelmio\Alice\FixtureBuilder\ExpressionLanguage\Parser\TokenParser\Chainable\FunctionTokenParserTest::testCanHandleNoArguments PHP Method

testCanHandleNoArguments() public method

    public function testCanHandleNoArguments()
    {
        $token = new Token('<foo()>', new TokenType(TokenType::FUNCTION_TYPE));
        $anotherToken = new Token('<foo(  )>', new TokenType(TokenType::FUNCTION_TYPE));
        $decoratedParserProphecy = $this->prophesize(ParserInterface::class);
        $decoratedParserProphecy->parse(Argument::any())->shouldNotBeCalled();
        /** @var ParserInterface $decoratedParser */
        $decoratedParser = $decoratedParserProphecy->reveal();
        $expected = new FunctionCallValue('foo');
        $parser = new FunctionTokenParser($decoratedParser);
        $actual0 = $parser->parse($token);
        $actual1 = $parser->parse($anotherToken);
        $this->assertEquals($expected, $actual0);
        $this->assertEquals($expected, $actual1);
    }