public function loginmobileAction() { header('Access-Control-Allow-Origin: *'); $this->getHelper('Layout')->disableLayout(); $this->getHelper('ViewRenderer')->setNoRender(); if ($this->getRequest()->isPost()) { $email = $this->_request->getPost('email_txt'); $senha = $this->_request->getPost('password_txt'); try { $_serviceAuth = new AuthService(); $result = $_serviceAuth->login($email, $senha); $jsonData = Zend_Json::encode($result); $this->getResponse()->setHeader('Content-Type', 'text/json')->setBody($jsonData)->sendResponse(); exit; } catch (Exception $e) { throw $e; } } }
/** * @expectedException Exception */ public function testLoginFunctionHasNotBeenSet() { $service = new AuthService($scope); $service->login([]); }