/**
  * 
  */
 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();
     }
 }
Exemple #2
0
 /**
  * @expectedException Exception 
  */
 public function testCadastrarValidar()
 {
     $GuiaModel = new GuiaModel();
     $GuiaModel->cadastrar();
 }