Beispiel #1
0
 function testUpdateUsers()
 {
     $udao = new UserDAO($this->db, $this->logger);
     $user_array1 = array('id' => 2, 'user_id' => 13, 'user_name' => 'ginatrapani', 'full_name' => 'Gina Trapani', 'avatar' => 'avatar.jpg', 'location' => 'NYC', 'description' => 'Blogger', 'url' => 'http://ginatrapani.org', 'is_protected' => 0, 'follower_count' => 5000, 'tweet_count' => 1000, 'joined' => '3/6/2007');
     $user1 = new User($user_array1, 'Test');
     $user_array2 = array('id' => 3, 'user_id' => 14, 'user_name' => 'anildash', 'full_name' => 'Anil Dash', 'avatar' => 'avatar.jpg', 'location' => 'NYC', 'description' => 'Blogger', 'url' => 'http://ginatrapani.org', 'is_protected' => 0, 'follower_count' => 5000, 'tweet_count' => 1000, 'joined' => '3/6/2007');
     $user2 = new User($user_array2, 'Test');
     $users_to_update = array($user1, $user2);
     $this->assertTrue($udao->updateUsers($users_to_update) == 2);
 }