use Symfony\Component\ExpressionLanguage\Lexer;
use Symfony\Component\ExpressionLanguage\SyntaxError;
use Symfony\Component\ExpressionLanguage\Token;
use Symfony\Component\ExpressionLanguage\TokenStream;
class LexerTest extends TestCase
{ private Lexer
$lexer;
protected function setUp(): void
{ $this->lexer =
new Lexer();
} /**
* @dataProvider getTokenizeData
*/
public function testTokenize($tokens,
$expression) { $tokens[] =
new Token('end of expression', null, \
strlen($expression) + 1
);
$this->
assertEquals(new TokenStream($tokens,
$expression),
$this->lexer->
tokenize($expression));
}