mirror of
https://github.com/Mibew/handlebars.php.git
synced 2024-11-15 08:44:12 +03:00
Add tests for missed Mustache helpers
This is the missed test case for #121
This commit is contained in:
parent
f3067cb41a
commit
2c78af65e0
@ -471,6 +471,7 @@ class HandlebarsTest extends \PHPUnit_Framework_TestCase
|
||||
$engine = new \Handlebars\Handlebars(array('loader' => $loader));
|
||||
$this->assertEquals('yes', $engine->render('{{#x}}yes{{/x}}', array('x' => true)));
|
||||
$this->assertEquals('', $engine->render('{{#x}}yes{{/x}}', array('x' => false)));
|
||||
$this->assertEquals('', $engine->render('{{#NOTVALID}}XXX{{/NOTVALID}}', array()));
|
||||
$this->assertEquals('yes', $engine->render('{{^x}}yes{{/x}}', array('x' => false)));
|
||||
$this->assertEquals('', $engine->render('{{^x}}yes{{/x}}', array('x' => true)));
|
||||
$this->assertEquals('1234', $engine->render('{{#x}}{{this}}{{/x}}', array('x' => array(1, 2, 3, 4))));
|
||||
|
Loading…
Reference in New Issue
Block a user