Adding test for delimiter switching in partials
This commit is contained in:
@@ -148,6 +148,15 @@ class MustacheTest extends PHPUnit_Framework_TestCase {
|
||||
$this->assertEquals('Zappa, Frank', $m->render('{{last_name}}, {{first_name}}', array('first_name' => 'Frank', 'last_name' => 'Zappa')));
|
||||
}
|
||||
|
||||
/**
|
||||
* @group partials
|
||||
*/
|
||||
public function testRenderDelimitersInPartials() {
|
||||
$m = new Mustache('{{>stache}}', null, array('stache' => '{{=<% %>=}}{{first_name}} {{last_name}}<%={{ }}=%>'));
|
||||
$this->assertEquals('Charlie Chaplin', $m->render(null, array('first_name' => 'Charlie', 'last_name' => 'Chaplin')));
|
||||
$this->assertEquals('{{first_name}} {{last_name}}', $m->render('{{last_name}}, {{first_name}}', array('first_name' => 'Frank', 'last_name' => 'Zappa')));
|
||||
}
|
||||
|
||||
/**
|
||||
* Mustache should allow newlines (and other whitespace) in comments and all other tags.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user