Exemplo n.º 1
0
 function testAuthorizeUser()
 {
     $info = new UserInfo($this->data);
     $store = new UserDB();
     $store->updateUser($info);
     $result = $store->authorizeUser($info);
     $this->assertEquals($info->userid, $result->userid);
     $this->assertEquals($info->username, $result->username);
     $fake = new UserInfo(array('username' => 'test', 'password' => 1111));
     $result = $store->authorizeUser($fake);
     $this->assertEquals(null, $result);
 }