public function SecKitTestCase::testHSTSAllDirectves in Security Kit 7
Same name and namespace in other branches
- 6 seckit.test \SecKitTestCase::testHSTSAllDirectves()
Tests HTTP Strict Transport Security has all directives.
File
- ./
seckit.test, line 506 - Tests for Security Kit module.
Class
- SecKitTestCase
- Functional tests for Security Kit.
Code
public function testHSTSAllDirectves() {
$form = array(
'seckit_ssl[hsts]' => TRUE,
'seckit_ssl[hsts_max_age]' => 1000,
'seckit_ssl[hsts_subdomains]' => 1,
);
$this
->drupalPost('admin/config/system/seckit', $form, t('Save configuration'));
$expected = 'max-age=1000; includeSubDomains';
$this
->assertEqual($expected, $this
->drupalGetHeader('Strict-Transport-Security'), t('HTTP Strict Transport Security has all the directives.'));
}