From a6f9f9b5e372d2bfd5120487f20128ce35bc950b Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 6 Dec 2011 16:54:00 +0100 Subject: [PATCH] added a unit test test for previous merge --- CHANGELOG | 1 + test/Twig/Tests/LexerTest.php | 11 +++++++++++ 2 files changed, 12 insertions(+), 0 deletions(-) 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()); + } } -- 1.7.2.5