[ExpressionLanguage] Test for the non-strict in_array check in parsePrimaryExpression in Parser.php

This commit is contained in:
Dmitry Parnas 2014-04-06 23:04:13 +02:00 committed by Fabien Potencier
parent e46513557a
commit 154c4a598a

View File

@ -28,6 +28,17 @@ class ParserTest extends \PHPUnit_Framework_TestCase
$parser->parse($lexer->tokenize('foo'));
}
/**
* @expectedException \Symfony\Component\ExpressionLanguage\SyntaxError
* @expectedExceptionMessage Variable "foo" is not valid around position 1.
*/
public function testParseWithZeroInNames()
{
$lexer = new Lexer();
$parser = new Parser(array());
$parser->parse($lexer->tokenize('foo'), array(0));
}
/**
* @dataProvider getParseData
*/