From: Fabien Potencier Date: Thu, 28 Apr 2011 14:21:27 +0000 (+0200) Subject: added a unit test X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=e70cc161a33abd41969eced2c1c4f6c84ca5b36e;p=web%2Fkonrad%2Ftwig.git added a unit test --- 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