/** * Method to instantiate the view. * * @param array $data The data array. * @param RendererInterface $renderer The renderer engine. */ public function __construct($data = array(), RendererInterface $renderer = null) { $this->renderer = $renderer ?: new PhpRenderer(); parent::__construct($data); $this->data = new Data($this->data); }
/** * Method to test render(). * * @return void * * @covers Windwalker\View\HtmlView::render */ public function testRender() { $this->assertEquals('<h1>Sakura</h1>', trim($this->instance->render())); $this->instance->set('flower', 'Olive'); $this->assertEquals('<h1>Olive</h1>', trim($this->instance->render())); }