/** * Renders a template. * * @param string $name The template name. * @param array $template The template. * * @return string The rendered template. */ public function renderTemplate($name, array $template) { return $this->helper->renderTemplate($name, $template); }
/** * @dataProvider pathProvider */ public function testRenderTemplate($path, $asset, $url) { $this->assetsHelperMock->expects($this->once())->method('getUrl')->with($this->equalTo($path))->will($this->returnValue($asset)); $this->assertSame('CKEDITOR.addTemplates("foo", {"imagesPath":' . json_encode($url) . ',"filename":"bat"});', $this->helper->renderTemplate('foo', array('imagesPath' => $path, 'filename' => 'bat'))); }