Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added a unit test test for previous merge

  • Loading branch information...
commit a6f9f9b5e372d2bfd5120487f20128ce35bc950b 1 parent f1e5278
@fabpot authored
Showing with 12 additions and 0 deletions.
  1. +1 −0  CHANGELOG
  2. +11 −0 test/Twig/Tests/LexerTest.php
View
1  CHANGELOG
@@ -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
View
11 test/Twig/Tests/LexerTest.php
@@ -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());
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.