Lines Matching refs:engine
35 $engine = new \Handlebars\Handlebars(array('loader' => $loader));
36 $this->assertEquals($result, $engine->render($src, $data));
81 $engine = new \Handlebars\Handlebars(array('loader' => $loader, 'helpers' => $helpers));
83 $this->assertEquals($result, $engine->render($src, $data));
228 $engine = new \Handlebars\Handlebars(array(
234 $this->assertEquals($result, $engine->render($src, $data));
245 $engine = new \Handlebars\Handlebars(array(
252 $this->assertEquals('apple, banana, 0, zucchini', $engine->render($template, $data));
404 $engine = new \Handlebars\Handlebars(array('helpers' => $helpers));
405 $this->assertTrue(is_callable($engine->getHelper('test')));
406 $this->assertTrue($engine->hasHelper('test'));
407 $engine->removeHelper('test');
408 $this->assertFalse($engine->hasHelper('test'));
417 $engine = new \Handlebars\Handlebars(array('loader' => $loader));
418 $engine->addHelper('test', function () {
421 $this->assertEquals('Test helper is called', $engine->render('{{#test}}', []));
453 $engine = new \Handlebars\Handlebars(array('cache' => $dummy));
455 $engine->render('test', array());