From db50167f5ffb284aca54aa4af1e92ea3cc3b02d7 Mon Sep 17 00:00:00 2001 From: Joseph Bielawski Date: Wed, 27 Apr 2011 08:01:08 -0700 Subject: [PATCH] Additional tests for issue #307 --- test/Twig/Tests/Fixtures/tests/empty.test | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/test/Twig/Tests/Fixtures/tests/empty.test b/test/Twig/Tests/Fixtures/tests/empty.test index d183a93..06065f0 100644 --- a/test/Twig/Tests/Fixtures/tests/empty.test +++ b/test/Twig/Tests/Fixtures/tests/empty.test @@ -4,9 +4,15 @@ {{ foo is empty ? 'ok' : 'ko' }} {{ bar is empty ? 'ok' : 'ko' }} {{ foobar is empty ? 'ok' : 'ko' }} +{{ array is empty ? 'ok' : 'ko' }} +{{ zero is empty ? 'ok' : 'ko' }} +{{ string is empty ? 'ok' : 'ko' }} --DATA-- -return array('foo' => '', 'bar' => null, 'foobar' => false); +return array('foo' => '', 'bar' => null, 'foobar' => false, 'array' => array(), 'zero' => 0, 'string' => '0'); --EXPECT-- ok ok ok +ok +ko +ko \ No newline at end of file -- 1.7.2.5