public function SecKitTestCaseTest::testEnabledReferrerPolicy in Security Kit 8
Same name and namespace in other branches
- 2.x tests/src/Functional/SecKitTestCaseTest.php \Drupal\Tests\seckit\Functional\SecKitTestCaseTest::testEnabledReferrerPolicy()
Tests enabled Referrer-Policy.
File
- tests/
src/ Functional/ SecKitTestCaseTest.php, line 563
Class
- SecKitTestCaseTest
- Functional tests for Security Kit.
Namespace
Drupal\Tests\seckit\FunctionalCode
public function testEnabledReferrerPolicy() {
$form = [
'seckit_various[referrer_policy]' => TRUE,
'seckit_various[referrer_policy_policy]' => 'no-referrer-when-downgrade',
];
$this
->drupalPostForm('admin/config/system/seckit', $form, t('Save configuration'));
$this
->assertSession()
->responseHeaderEquals('Referrer-Policy', 'no-referrer-when-downgrade');
}