public function TfaBasicTestCase::_testAdminDisable in TFA Basic plugins 7
1 call to TfaBasicTestCase::_testAdminDisable()
File
- tests/
tfa_basic.test, line 188 - tfa_basic.test. Drupal test cases for TFA basic plugins.
Class
- TfaBasicTestCase
- Tests the functionality of the TFA basic plugins.
Code
public function _testAdminDisable() {
$this
->drupalLogin($this->admin_user);
$this
->drupalGet('user/' . $this->web_user->uid . '/security/tfa');
$this
->assertText($this->web_user->name, 'Account name appears');
$this
->assertText($this
->uiStrings('tfa-status-enabled'));
$this
->assertLink($this
->uiStrings('tfa-disable'));
$this
->drupalGet('user/' . $this->web_user->uid . '/security/tfa/disable');
$this
->assertText($this
->uiStrings('tfa-disable-confirm'));
$edit = array(
'current_pass' => $this->admin_user->pass_raw,
);
$this
->drupalPost('user/' . $this->web_user->uid . '/security/tfa/disable', $edit, 'Disable');
$this
->assertText($this
->uiStrings('tfa-disabled'));
}