Creating new Test to prove error
This commit is contained in:
@@ -151,10 +151,13 @@ class MustacheTest extends PHPUnit_Framework_TestCase {
|
|||||||
/**
|
/**
|
||||||
* @group partials
|
* @group partials
|
||||||
*/
|
*/
|
||||||
public function testRenderDelimitersInPartials() {
|
public function testRenderDelimitersInSections() {
|
||||||
$m = new Mustache('{{>stache}}', null, array('stache' => '{{=<% %>=}}{{first_name}} {{last_name}}<%={{ }}=%>'));
|
$m = new Mustache('{{#a}}{{=<% %>=}}{{b}} c<%={{ }}=%>{{/a}}');
|
||||||
$this->assertEquals('{{first_name}} {{last_name}}', $m->render(null, array('first_name' => 'Charlie', 'last_name' => 'Chaplin')));
|
$this->assertEquals('{{b}} c', $m->render(null, array(
|
||||||
$this->assertEquals('{{first_name}} {{last_name}}', $m->render('{{last_name}}, {{first_name}}', array('first_name' => 'Frank', 'last_name' => 'Zappa')));
|
'a' => array(
|
||||||
|
array('b' => 'Do Not Render')
|
||||||
|
)
|
||||||
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user