parse() public method

public parse ( Token $token ) : FunctionCallValue
$token Nelmio\Alice\FixtureBuilder\ExpressionLanguage\Token
return Nelmio\Alice\Definition\Value\FunctionCallValue
Example #1
0
 public function testCanParseArgumentsForCurrentValue()
 {
     // Arguments should be discarded
     $token = new Token('<current( arg0 , arg1 )>', new TokenType(TokenType::FUNCTION_TYPE));
     $expected = new FunctionCallValue('current', [new ValueForCurrentValue()]);
     $parser = new FunctionTokenParser(new FakeParser());
     $actual = $parser->parse($token);
     $this->assertEquals($expected, $actual);
     $this->assertInstanceOf(ValueForCurrentValue::class, $actual->getArguments()[0]);
 }