Fix scoping error

This commit is contained in:
hfhchan 2016-07-30 01:31:55 +08:00 committed by GitHub
parent 07d8542e3b
commit dfb62e42cc

View File

@ -581,6 +581,10 @@ class HandlebarsTest extends \PHPUnit_Framework_TestCase
*/
public function testSafeStringClass()
{
$loader = new \Handlebars\Loader\StringLoader();
$helpers = new \Handlebars\Helpers();
$engine = new \Handlebars\Handlebars(array('loader' => $loader, 'helpers' => $helpers));
$this->assertEquals('<strong>Test</strong>', $engine->render('{{string}}', array(
'string' => new \Handlebars\SafeString('<strong>Test</strong>')
)));