public function SecKitTestCase::testReferrerPolicyIsEnabled in Security Kit 7
Tests enabled Referrer-Policy HTTP response header.
File
- ./
seckit.test, line 554 - Tests for Security Kit module.
Class
- SecKitTestCase
- Functional tests for Security Kit.
Code
public function testReferrerPolicyIsEnabled() {
$form['seckit_various[referrer_policy]'] = TRUE;
$form['seckit_various[referrer_policy_policy]'] = 'no-referrer-when-downgrade';
$this
->drupalPost('admin/config/system/seckit', $form, t('Save configuration'));
$this
->assertEqual('no-referrer-when-downgrade', $this
->drupalGetHeader('Referrer-Policy'), t('Referrer-Policy is enabled and set to no-referrer-when-downgrade.'));
}