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