You are here

public function SecKitTestCase::testDisabledHSTS in Security Kit 7

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

Tests disabled HTTP Strict Transport Security.

File

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

Class

SecKitTestCase
Functional tests for Security Kit.

Code

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