From 83cf3158ae68f87c7d22863c2c9f49c7b121c416 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Wed, 1 Aug 2012 23:08:17 -0700 Subject: [PATCH] Context::find Failing test Closures don't like it when you touch their properties. --- .../Functional/ClosureQuirksTest.php | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 test/Mustache/Test/FiveThree/Functional/ClosureQuirksTest.php diff --git a/test/Mustache/Test/FiveThree/Functional/ClosureQuirksTest.php b/test/Mustache/Test/FiveThree/Functional/ClosureQuirksTest.php new file mode 100644 index 0000000..9f9f548 --- /dev/null +++ b/test/Mustache/Test/FiveThree/Functional/ClosureQuirksTest.php @@ -0,0 +1,30 @@ +mustache = new Mustache_Engine; + } + + public function testClosuresDontLikeItWhenYouTouchTheirProperties() + { + $tpl = $this->mustache->loadTemplate('{{ foo.bar }}'); + $this->assertEquals('', $tpl->render(array('foo' => function() { return 'FOO'; }))); + } +}