You are here

public function SecKitTestCase::testDisabledHSTS in Security Kit 6

Same name and namespace in other branches
  1. 7 seckit.test \SecKitTestCase::testDisabledHSTS()

Tests disabled HTTP Strict Transport Security.

File

./seckit.test, line 301
Tests for Security Kit module.

Class

SecKitTestCase
Functional tests for Security Kit.

Code

public function testDisabledHSTS() {
  $form['seckit_ssl[hsts]'] = FALSE;
  $this
    ->drupalPost('admin/settings/seckit', $form, t('Save configuration'));
  $this
    ->assertFalse($this
    ->drupalGetHeader('Strict-Transport-Security'), t('HTTP Strict Transport Security is disabled.'));
}