Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

Latest commit

 

History

History
45 lines (29 loc) · 1.32 KB

README.md

File metadata and controls

45 lines (29 loc) · 1.32 KB

Build Status

FacebookTestuserBundle

This bundle manages facebook test users. The Bundle offers functionality for adding, deleting, listing and modifying test users. It is also possible to add Friendships between test users.

The Bundle is intended to help testing Facebook enabled applications.

Examples

$provider = new FacebookTestuserProvider(new new Facebook(array(
                                                         'appId'  => '344617158898614',
                                                         'secret' => '6dc8ac871858b34798bc2488200e503d',
                                                       )));

// add a new Testuser

$user1 = $provider->addTestUser();
$user2 = $provider->addTestUser();

echo($user1->getAccessToken());
echo($user1->getLoginURL());
echo($user1->getFacebookId());

$provider->addUserFriendship($user1, $user2); // makes a friend request and confirms it

/**
 * @var $users array
 */
$users = $provider->getTestUsers(); // array of all users

$provider->deleteTestUser($user1);
$provider->deleteAllTestUsers();

$provider->changeTestUserName($user1, 'Sepp H.');

$provider->changeTestUserPassword($user1, 'topsecret');