function FbconnectTestCase::testRegistration in Facebook Connect 8.2
Same name and namespace in other branches
- 6.2 tests/fbconnect.test \FbconnectTestCase::testRegistration()
- 7.2 tests/fbconnect.test \FbconnectTestCase::testRegistration()
File
- tests/
fbconnect.test, line 134
Class
- FbconnectTestCase
- @file
Code
function testRegistration() {
variable_set('fbconnect_reg_options', 1);
variable_set('user_register', USER_REGISTER_VISITORS);
$fb_user = $this
->_createFbTestUser('true');
$edit = array(
'fbuid' => $fb_user['id'],
'access_token' => $fb_user['access_token'],
);
$this
->drupalPost('fbconnect-test/init-fb-session', $edit, 'Submit');
$this
->assertFieldByName('fbuid', $fb_user['id'], 'FB Session inited', 'FBConnect');
$edit = array(
'mail' => $this
->randomName() . '@example.com',
);
$this
->drupalPost('fbconnect/authorize', $edit, 'Create new account');
$this
->assertLink('My account', 0, 'User is logged in', 'FBConnect');
}