You are here

public function SecKitTestCaseTest::testXxssProtectionIsDisabled in Security Kit 8

Same name and namespace in other branches
  1. 2.x tests/src/Functional/SecKitTestCaseTest.php \Drupal\Tests\seckit\Functional\SecKitTestCaseTest::testXxssProtectionIsDisabled()

Tests disabled X-XSS-Protection HTTP response header.

File

tests/src/Functional/SecKitTestCaseTest.php, line 353

Class

SecKitTestCaseTest
Functional tests for Security Kit.

Namespace

Drupal\Tests\seckit\Functional

Code

public function testXxssProtectionIsDisabled() {
  $form['seckit_xss[x_xss][select]'] = SeckitInterface::X_XSS_DISABLE;
  $this
    ->drupalPostForm('admin/config/system/seckit', $form, t('Save configuration'));
  $this
    ->assertSession()
    ->responseHeaderEquals('X-XSS-Protection', NULL);
}