function SecurePagesTestCase::_testSettingsForm in Secure Pages 8
Same name and namespace in other branches
- 6.2 securepages.test \SecurePagesTestCase::_testSettingsForm()
- 6 securepages.test \SecurePagesTestCase::_testSettingsForm()
- 7 securepages.test \SecurePagesTestCase::_testSettingsForm()
Test submitting the settings form.
1 call to SecurePagesTestCase::_testSettingsForm()
- SecurePagesTestCase::testSecurePages in ./
securepages.test - Runs all the test functions. These are run from a single outer function to avoid multiple re-installs by simpletest.
File
- ./
securepages.test, line 44 - Provides SimpleTests for Secure Pages module.
Class
- SecurePagesTestCase
- @file Provides SimpleTests for Secure Pages module.
Code
function _testSettingsForm() {
// Undo the setUp() function.
variable_del('securepages_enable');
// Enable securepages.
$this->web_user = $this
->drupalCreateUser(array(
'administer site configuration',
'access administration pages',
));
$this
->loginHTTPS($this->web_user);
$edit = array(
'securepages_enable' => 1,
);
$this
->drupalPost('admin/config/system/securepages', $edit, t('Save configuration'), array(
'https' => TRUE,
));
$this
->assertRaw(t('The configuration options have been saved.'));
// Clean up
$this
->drupalLogout();
}