Add a failing test case for #322
This commit is contained in:
@@ -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 {{<partial}}{{$a}}C{{/a}}{{/partial}} {{<partial}}{{$b}}D{{/b}}{{/partial}}'
|
||||
);
|
||||
|
||||
$data = array();
|
||||
|
||||
$this->assertEquals('test |C B| |A D|', $tpl->render($data));
|
||||
}
|
||||
|
||||
public function testDataDoesNotOverrideBlock()
|
||||
{
|
||||
$partials = array(
|
||||
|
||||
Reference in New Issue
Block a user