Added test case for resetting pragmas when reusing a single Mustache instance to render multiple templates.
This commit is contained in:
@@ -39,4 +39,10 @@ class MustachePragmaTest extends PHPUnit_Framework_TestCase {
|
|||||||
$this->assertEquals("1\n23", $m->render("1\n2{{%DOT-NOTATION}}\n3"), 'Wrong newline removed with pragma tag');
|
$this->assertEquals("1\n23", $m->render("1\n2{{%DOT-NOTATION}}\n3"), 'Wrong newline removed with pragma tag');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testPragmaReset() {
|
||||||
|
$m = new Mustache('', array('symbol' => '>>>'));
|
||||||
|
$this->assertEquals('>>>', $m->render('{{{symbol}}}'));
|
||||||
|
$this->assertEquals('>>>', $m->render('{{%UNESCAPED}}{{symbol}}'));
|
||||||
|
$this->assertEquals('>>>', $m->render('{{{symbol}}}'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user