You are here

public function SecKitTestCaseTest::testXxssProtectionIs0 in Security Kit 8

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

Tests set to 0 X-XSS-Protection HTTP response header.

File

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

Class

SecKitTestCaseTest
Functional tests for Security Kit.

Namespace

Drupal\Tests\seckit\Functional

Code

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