You are here

function SecurepagesTest::_testSettingsForm in Secure Pages 8

Test submitting the settings form.

1 call to SecurepagesTest::_testSettingsForm()
SecurepagesTest::testSecurePages in src/Tests/SecurepagesTest.php
Runs all the tests in a sequence to avoid multiple re-installs.

File

src/Tests/SecurepagesTest.php, line 73
Contains \Drupal\securepages\Tests\SecurepagesTest.

Class

SecurepagesTest
Test Secure Pages redirects.

Namespace

Drupal\securepages\Tests

Code

function _testSettingsForm() {
  $this
    ->drupalLoginHttps($this
    ->drupalCreateUser([
    'administer site configuration',
  ]));
  $this
    ->drupalPostForm(Securepages::getUrl('securepages.admin_settings'), [
    'enable' => 1,
  ], t('Save configuration'));
  $this
    ->assertRaw(t('The configuration options have been saved.'));

  // Clean up.
  $this
    ->drupalLogoutHttps();
}