@@ -36,4 +36,17 @@ class Mustache_Test_FiveThree_Functional_LambdaHelperTest extends PHPUnit_Framew
|
||||
$this->assertEquals('Mario', $one->render($foo));
|
||||
$this->assertEquals('MARIO', $two->render($foo));
|
||||
}
|
||||
|
||||
public function testSectionLambdaHelperRespectsDelimiterChanges()
|
||||
{
|
||||
$tpl = $this->mustache->loadTemplate("{{=<% %>=}}\n<%# bang %><% value %><%/ bang %>");
|
||||
|
||||
$data = new StdClass();
|
||||
$data->value = 'hello world';
|
||||
$data->bang = function ($text, $mustache) {
|
||||
return $mustache->render($text) . '!';
|
||||
};
|
||||
|
||||
$this->assertEquals('hello world!', $tpl->render($data));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user