Skip to content

Commit 154c4a5

Browse files
parnasfabpot
authored andcommitted
[ExpressionLanguage] Test for the non-strict in_array check in parsePrimaryExpression in Parser.php
1 parent e465135 commit 154c4a5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Symfony/Component/ExpressionLanguage/Tests/ParserTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,17 @@ public function testParseWithInvalidName()
2828
$parser->parse($lexer->tokenize('foo'));
2929
}
3030

31+
/**
32+
* @expectedException \Symfony\Component\ExpressionLanguage\SyntaxError
33+
* @expectedExceptionMessage Variable "foo" is not valid around position 1.
34+
*/
35+
public function testParseWithZeroInNames()
36+
{
37+
$lexer = new Lexer();
38+
$parser = new Parser(array());
39+
$parser->parse($lexer->tokenize('foo'), array(0));
40+
}
41+
3142
/**
3243
* @dataProvider getParseData
3344
*/

0 commit comments

Comments
 (0)