Permalink
Browse files

added a unit test test for previous merge

  • Loading branch information...
fabpot committed Dec 6, 2011
1 parent f1e5278 commit a6f9f9b5e372d2bfd5120487f20128ce35bc950b
Showing with 12 additions and 0 deletions.
  1. +1 −0 CHANGELOG
  2. +11 −0 test/Twig/Tests/LexerTest.php
View
@@ -1,5 +1,6 @@
* 1.4.0
+ * fixed lexer when using big numbers (> PHP_INT_MAX)
* added missing preserveKeys argument to the reverse filter
* fixed macros containing filter tag calls
@@ -138,4 +138,15 @@ public function testLongBlock()
// should not throw an exception
}
+
+ public function testBigNumbers()
+ {
+ $template = '{{ 922337203685477580700 }}';
+
+ $lexer = new Twig_Lexer(new Twig_Environment());
+ $stream = $lexer->tokenize($template);
+ $node = $stream->next();
+ $node = $stream->next();
+ $this->assertEquals(922337203685477580700, $node->getValue());
+ }
}

0 comments on commit a6f9f9b

Please sign in to comment.