Skip to content

Commit a784b66

Browse files
[ExpressionLanguage] Add missing test case for Lexer
1 parent 33a9d1a commit a784b66

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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)