true, 'name' => 'Foo Phpunit User', 'locale' => 'en_US', 'permissions' => implode(',', static::$testUserPermissions), ); $request = new FacebookRequest(static::getAppSession(), 'POST', $testUserPath, $params); $response = $request->execute()->getGraphObject(); static::$testUserId = $response->getProperty('id'); static::$testUserAccessToken = $response->getProperty('access_token'); } public static function getAppSession() { return new FacebookSession(static::getAppToken()); } public static function getAppToken() { return FacebookTestCredentials::$appId . '|' . FacebookTestCredentials::$appSecret; } public static function deleteTestUser() { if (!static::$testUserId) { return; } $testUserPath = '/' . static::$testUserId; $request = new FacebookRequest(static::getAppSession(), 'DELETE', $testUserPath); $request->execute(); } }