From df13370b224f6c3f06aadc6dfcbba86fdcbae364 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 6 Dec 2012 08:16:15 +0100 Subject: [PATCH] added a missing test --- test/Twig/Tests/TemplateTest.php | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/test/Twig/Tests/TemplateTest.php b/test/Twig/Tests/TemplateTest.php index ac67e02..448bdf8 100644 --- a/test/Twig/Tests/TemplateTest.php +++ b/test/Twig/Tests/TemplateTest.php @@ -115,8 +115,13 @@ class Twig_Tests_TemplateTest extends PHPUnit_Framework_TestCase $this->assertInstanceof('Twig_Markup', $template->getAttribute($template1, 'string')); $this->assertEquals('some_string', $template->getAttribute($template1, 'string')); + $this->assertInstanceof('Twig_Markup', $template->getAttribute($template1, 'true')); $this->assertEquals('1', $template->getAttribute($template1, 'true')); + + $this->assertInstanceof('Twig_Markup', $template->getAttribute($template1, 'zero')); + $this->assertEquals('0', $template->getAttribute($template1, 'zero')); + $this->assertNotInstanceof('Twig_Markup', $template->getAttribute($template1, 'empty')); $this->assertSame('', $template->getAttribute($template1, 'empty')); } @@ -318,6 +323,11 @@ class Twig_TemplateTest extends Twig_Template Twig_Template::clearCache(); } + public function getZero() + { + return 0; + } + public function getEmpty() { return ''; -- 1.7.2.5