Add tests for passing SafeString as

This commit is contained in:
hfhchan 2016-07-30 01:14:21 +08:00 committed by GitHub
parent 402f970b77
commit 5222c6dff1

View File

@ -576,6 +576,16 @@ class HandlebarsTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('new', $string->getString());
}
/**
* test SafeString class
*/
public function testSafeStringClass()
{
$this->assertEquals('<strong>Test</strong>', $engine->render('{{string}}', array(
'string' => new \Handlebars\SafeString('<strong>Test</strong>')
)));
}
/**
* @param $dir
*