From e70cc161a33abd41969eced2c1c4f6c84ca5b36e Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 28 Apr 2011 16:21:27 +0200 Subject: [PATCH] added a unit test --- test/Twig/Tests/Fixtures/tests/defined.test | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/test/Twig/Tests/Fixtures/tests/defined.test b/test/Twig/Tests/Fixtures/tests/defined.test index e4159fd..b6119c0 100644 --- a/test/Twig/Tests/Fixtures/tests/defined.test +++ b/test/Twig/Tests/Fixtures/tests/defined.test @@ -4,11 +4,12 @@ {{ foo is defined ? 'ok' : 'ko' }} {{ bar is defined ? 'ok' : 'ko' }} {{ foobar is not defined ? 'ok' : 'ko' }} +{{ zero is defined ? 'ok' : 'ko' }} {{ nested.foo is defined ? 'ok' : 'ko' }} {{ nested.bar is not defined ? 'ok' : 'ko' }} {{ nested.zero is defined ? 'ok' : 'ko' }} --DATA-- -return array('foo' => 'bar', 'bar' => null, 'nested' => array('foo' => 'foo', 'zero' => 0)); +return array('foo' => 'bar', 'bar' => null, 'zero' => 0, 'nested' => array('foo' => 'foo', 'zero' => 0)); --EXPECT-- ok ok @@ -16,3 +17,4 @@ ok ok ok ok +ok -- 1.7.2.5