diff --git a/test/Mustache/Test/Functional/InheritanceTest.php b/test/Mustache/Test/Functional/InheritanceTest.php index b39555f..598d959 100644 --- a/test/Mustache/Test/Functional/InheritanceTest.php +++ b/test/Mustache/Test/Functional/InheritanceTest.php @@ -227,6 +227,23 @@ class Mustache_Test_Functional_InheritanceTest extends PHPUnit_Framework_TestCas $this->assertEquals('test |override1 default| |override2 default|', $tpl->render($data)); } + public function testBlocksDoNotLeakBetweenPartials() + { + $partials = array( + 'partial' => '|{{$a}}A{{/a}} {{$b}}B{{/b}}|', + ); + + $this->mustache->setPartials($partials); + + $tpl = $this->mustache->loadTemplate( + 'test {{assertEquals('test |C B| |A D|', $tpl->render($data)); + } + public function testDataDoesNotOverrideBlock() { $partials = array(