added a unit test test for previous merge

This commit is contained in:
Fabien Potencier
2011-12-06 16:54:00 +01:00
parent f1e5278aea
commit a6f9f9b5e3
2 changed files with 12 additions and 0 deletions
+1
View File
@@ -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
+11
View File
@@ -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());
}
}