/** * @depends testGetUser * @param int $userID */ public function testDeleteUser($userID) { $this->setCurrentUser(); $this->getRequest()->setMethod(Request::METHOD_DELETE); $this->routeMatch->setParam('id', $userID); try { $jsonModel = $this->controller->dispatch($this->getRequest()); } catch (\Exception $e) { var_dump($e->getMessage()); } $this->assertEquals(200, $this->controller->getResponse()->getStatusCode()); $this->assertEquals('success', $jsonModel->getVariable('message')['type']); }