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

testCanHandleASingleArgument() public method

    public function testCanHandleASingleArgument()
    {
        $token = new Token('<foo(arg)>', new TokenType(TokenType::FUNCTION_TYPE));
        $decoratedParserProphecy = $this->prophesize(ParserInterface::class);
        $decoratedParserProphecy->parse('arg')->willReturn('parsed_arg');
        /** @var ParserInterface $decoratedParser */
        $decoratedParser = $decoratedParserProphecy->reveal();
        $expected = new FunctionCallValue('foo', ['parsed_arg']);
        $parser = new FunctionTokenParser($decoratedParser);
        $actual = $parser->parse($token);
        $this->assertEquals($expected, $actual);
        $decoratedParserProphecy->parse(Argument::any())->shouldHaveBeenCalledTimes(1);
    }