/** * */ public function cadastrarAction() { try { $guia = new GuiaModel(null, $this->getRequest()->getParam('categoria'), $this->getRequest()->getParam('nomeGuia'), $this->getRequest()->getParam('txtGuia')); $guia->cadastrar(); $this->view->guia = $guia->toStdClass(); } catch (Exception $e) { xd($e); $this->view->error = $e->getMessage(); } }
/** * @expectedException Exception */ public function testCadastrarValidar() { $GuiaModel = new GuiaModel(); $GuiaModel->cadastrar(); }