You are here

function FbconnectTestCase::testRegistration in Facebook Connect 6.2

Same name and namespace in other branches
  1. 8.2 tests/fbconnect.test \FbconnectTestCase::testRegistration()
  2. 7.2 tests/fbconnect.test \FbconnectTestCase::testRegistration()

@todo.

File

tests/fbconnect.test, line 126

Class

FbconnectTestCase
@file

Code

function testRegistration() {
  variable_set('fbconnect_reg_options', 1);
  $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/register/create', $edit, 'Create new account');
  $this
    ->assertLink('My account', 0, 'User is logged in', 'FBConnect');
}