mirror of
https://github.com/Mibew/handlebars.php.git
synced 2024-11-15 08:44:12 +03:00
Add test for helpers auto escaping
This commit is contained in:
parent
44a6f96e96
commit
390bc70a0c
@ -240,6 +240,12 @@ class HandlebarsTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$engine->addHelper('dontrenderme', function() {return "{{test}}";});
|
||||
$this->assertEquals('{{test}}', $engine->render('{{#dontrenderme}}', array()));
|
||||
|
||||
$engine->addHelper('markupHelper', function() {
|
||||
return '<strong>Test</strong>';
|
||||
});
|
||||
$this->assertEquals('<strong>Test</strong>', $engine->render('{{{markupHelper}}}', array()));
|
||||
$this->assertEquals('<strong>Test</strong>', $engine->render('{{markupHelper}}', array()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user