コード例 #1
0
 public function edituserindb()
 {
     $objUsersModel = new UsersModel();
     if ($objUsersModel->editUser() == false) {
         header('location:' . BASE_URL . '/users/edituserview/' . $_REQUEST['user_id'] . '/Username Already Exists');
         exit;
     } else {
         header('location:' . BASE_URL . '/users/listusers');
         exit;
     }
 }
コード例 #2
0
 public function testeditUser()
 {
     $_REQUEST['username'] = '******';
     $_REQUEST['password'] = '******';
     $_REQUEST['user_id'] = 1;
     $_SESSION['id'] = $_REQUEST['user_id'];
     $objUsers = new um();
     $arr = $objUsers->editUser();
     if ($arr == false) {
         $msg = 'DUPLICATE';
     } else {
         $msg = 'SUCCESS';
     }
     $this->assertEquals('SUCCESS', $msg);
 }