public function SecKitTestCaseTest::testXxssProtectionIs1 in Security Kit 8
Same name and namespace in other branches
- 2.x tests/src/Functional/SecKitTestCaseTest.php \Drupal\Tests\seckit\Functional\SecKitTestCaseTest::testXxssProtectionIs1()
Tests set to 1 X-XSS-Protection HTTP response header.
File
- tests/
src/ Functional/ SecKitTestCaseTest.php, line 371
Class
- SecKitTestCaseTest
- Functional tests for Security Kit.
Namespace
Drupal\Tests\seckit\FunctionalCode
public function testXxssProtectionIs1() {
$form['seckit_xss[x_xss][select]'] = SeckitInterface::X_XSS_1;
$this
->drupalPostForm('admin/config/system/seckit', $form, t('Save configuration'));
$this
->assertSession()
->responseHeaderEquals('X-XSS-Protection', '1');
}