Skip to content

Commit

Permalink
[ExpressionLanguage] Add missing test case for Lexer
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-daubois committed Oct 4, 2024
1 parent 33a9d1a commit a784b66
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Tests/LexerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ public function testTokenizeThrowsErrorOnUnclosedBrace()
$this->lexer->tokenize($expression);
}

public function testTokenizeOnNotOpenedBracket()
{
$this->expectException(SyntaxError::class);
$this->expectExceptionMessage('Unexpected ")" around position 7 for expression `service)not.opened.expression.dummyMethod()`.');

$expression = 'service)not.opened.expression.dummyMethod()';

$this->lexer->tokenize($expression);
}

public static function getTokenizeData()
{
return [
Expand Down

0 comments on commit a784b66

Please sign in to comment.