From: Fabien Potencier Date: Tue, 6 Dec 2011 15:54:00 +0000 (+0100) Subject: added a unit test test for previous merge X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=a6f9f9b5e372d2bfd5120487f20128ce35bc950b;p=web%2Fkonrad%2Ftwig.git added a unit test test for previous merge --- diff --git a/CHANGELOG b/CHANGELOG index e96f033..db51a60 100644 --- a/CHANGELOG +++ b/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 diff --git a/test/Twig/Tests/LexerTest.php b/test/Twig/Tests/LexerTest.php index 6e324ad..220307e 100644 --- a/test/Twig/Tests/LexerTest.php +++ b/test/Twig/Tests/LexerTest.php @@ -138,4 +138,15 @@ class Twig_Tests_LexerTest extends PHPUnit_Framework_TestCase // 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()); + } }