Ejemplo n.º 1
0
 /**
  * Delete action.  Removes the specified user.
  */
 public function deleteAction()
 {
     $user = new DbUserModel(array('dbUserID' => $this->_getParam('id')));
     $user->delete();
     $this->flash('notice', 'User successfully deleted');
     $this->_redirector->gotoRoute(array('action' => 'index', 'id' => null));
 }
Ejemplo n.º 2
0
 public function testDeletingUserRemovesIt()
 {
     $user = new DbUserModel(array('dbUserID' => 1));
     $user->delete();
     try {
         $user = new DbUserModel(array('dbUserID' => 1));
     } catch (Exception $e) {
         return;
     }
     $this->fail('Expected an Exception to be thrown');
 }