/** * Test method: setAlert(). */ public function testSetAlert() { $alert = $this->alertManager->create(); $this->alertManager->setAlert($alert); $this->assertEquals($alert, $this->alertManager->getAlert()); }
/** * Render alerts template. * * @param array $options * * @return string */ public function render($options = array()) { $alert = $this->alertManager->getAlert(); $options['alerts'] = $alert ? $alert->all() : array(); return $this->alertHelper->render($options, $this->getTemplate($options)); }