You are here

function OpenIDFunctionalTestCase::testDelete in Drupal 7

Test deleting an OpenID identity from a user's profile.

File

modules/openid/openid.test, line 229
Tests for openid.module.

Class

OpenIDFunctionalTestCase
Test discovery and login using OpenID

Code

function testDelete() {
  $this
    ->drupalLogin($this->web_user);

  // Add identity to user's profile.
  $identity = url('openid-test/yadis/xrds', array(
    'absolute' => TRUE,
  ));
  $this
    ->addIdentity($identity);
  $this
    ->assertText($identity, 'Identity appears in list.');

  // Delete the newly added identity.
  $this
    ->clickLink(t('Delete'));
  $this
    ->drupalPost(NULL, array(), t('Confirm'));
  $this
    ->assertText(t('OpenID deleted.'), 'Identity deleted');
  $this
    ->assertNoText($identity, 'Identity no longer appears in list.');
}