Skip to content

Commit 4eb9157

Browse files
[ExpressionLanguage] Add missing test case for Lexer
1 parent 2d324e5 commit 4eb9157

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@ public function testTokenizeThrowsErrorOnUnclosedBrace()
5454
$this->lexer->tokenize($expression);
5555
}
5656

57+
public function testTokenizeOnNotOpenedBracket()
58+
{
59+
$this->expectException(SyntaxError::class);
60+
$this->expectExceptionMessage('Unexpected ")" around position 7 for expression `service)not.opened.expression.dummyMethod()`.');
61+
62+
$expression = 'service)not.opened.expression.dummyMethod()';
63+
64+
$this->lexer->tokenize($expression);
65+
}
66+
5767
public static function getTokenizeData()
5868
{
5969
return [

0 commit comments

Comments
 (0)