public function SecKitTestCaseTest::testDisabledCsp in Security Kit 8
Same name and namespace in other branches
- 2.x tests/src/Functional/SecKitTestCaseTest.php \Drupal\Tests\seckit\Functional\SecKitTestCaseTest::testDisabledCsp()
Tests disabled Content Security Policy.
File
- tests/
src/ Functional/ SecKitTestCaseTest.php, line 73
Class
- SecKitTestCaseTest
- Functional tests for Security Kit.
Namespace
Drupal\Tests\seckit\FunctionalCode
public function testDisabledCsp() {
$form['seckit_xss[csp][checkbox]'] = FALSE;
$this
->drupalPostForm('admin/config/system/seckit', $form, t('Save configuration'));
$this
->assertSession()
->responseHeaderEquals('Content-Security-Policy', NULL);
$this
->assertSession()
->responseHeaderEquals('X-Content-Security-Policy', NULL);
$this
->assertSession()
->responseHeaderEquals('X-WebKit-CSP', NULL);
}