$t->is($dms->recipient->screen_name, 'n1k0', 'getDirectMessage() retrieves correctly dm recipient'); // getDirectMessages() $t->diag('getDirectMessages()'); $dms = $client->getDirectMessages(); $t->isa_ok($dms, 'TwitterDirectMessageCollection', 'getDirectMessages() retrieves a TwitterDirectMessageCollection'); $t->is($dms[0]->sender->screen_name, 'duboisnicolas', 'getDirectMessages() retrieves correctly dm sender'); $t->is($dms[0]->recipient->screen_name, 'n1k0', 'getDirectMessages() retrieves correctly dm recipient'); // getDowntimeSchedule() // getFavorites() $t->diag('getFavorites()'); $faves = $client->getFavorites(); $t->isa_ok($faves, 'TweetCollection', 'getFavorites() retrieves a tweet collection'); $t->is($faves[0]->user->screen_name, 'tschellenbach', 'getFavorites() retrieves correctly the first tweet author'); // getFollowers() $t->diag('getFollowers()'); $followers = $client->getFollowers(); $t->isa_ok($followers, 'TwitterUserCollection', 'getFollowers() retrieves a TwitterUserCollection'); $t->is($followers[0]->screen_name, 'css4design', 'getFollowers() retrieves correctly the first user screen name'); // getFriends() $t->diag('getFriends()'); $friends = $client->getFriends(); $t->isa_ok($friends, 'TwitterUserCollection', 'getFriends() retrieves a TwitterUserCollection'); $t->is($friends[0]->screen_name, 'ancailliau', 'getFriends() retrieves correctly the first user screen name'); // getFriendsTimeline() $t->diag('getFriendsTimeline()'); $tweets = $client->getFriendsTimeline(); $t->isa_ok($tweets, 'TweetCollection', 'getFriendsTimeline() retrieves a tweet collection'); $t->is($tweets[0]->user->screen_name, 'plouga', 'getFriendsTimeline() retrieves correctly the first tweet author'); // getPublicTimeline() $t->diag('getPublicTimeline()'); $tweets = $client->getPublicTimeline();