public function tearDown() { if ($this->_org && $this->_org->getId()) { $this->_org->delete(); } if ($this->_user && $this->_user->getId()) { $this->_user->delete(); } if ($this->_service && $this->_user && $this->_user->getUserName()) { $user = $this->_service->loadByUsername($this->_user->getUserName()); if (!is_null($user)) { $user->delete(); } } }
/** * @expectedException Application\Exceptions\NotFoundException */ public function testRemoveNonexistentUser() { $user = new UserModel(); $user->setId("testNonExistingId"); $user->delete(); }