Nelmio\Alice\FixtureBuilder\ExpressionLanguage\Parser\TokenParser\Chainable\PropertyReferenceTokenParserTest::testThrowsAnExceptionIfParsingReferenceReturnsUnexpectedResult PHP Method

testThrowsAnExceptionIfParsingReferenceReturnsUnexpectedResult() public method

    public function testThrowsAnExceptionIfParsingReferenceReturnsUnexpectedResult()
    {
        $token = new Token('@@malformed_user->username', new TokenType(TokenType::PROPERTY_REFERENCE_TYPE));
        $decoratedParserProphecy = $this->prophesize(ParserInterface::class);
        $decoratedParserProphecy->parse('@@malformed_user')->willReturn('string value');
        /** @var ParserInterface $decoratedParser */
        $decoratedParser = $decoratedParserProphecy->reveal();
        $parser = new PropertyReferenceTokenParser($decoratedParser);
        $parser->parse($token);
    }