public function testLongBlock() { $template = '{% ' . str_repeat('x', 100000) . ' %}'; $lexer = new Twig_Lexer(new Twig_Environment()); $stream = $lexer ->tokenize($template); // should not throw an exception }