You are here

public function SecKitTestCaseTest::testXxssProtectionIs1Block in Security Kit 8

Same name and namespace in other branches
  1. 2.x 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\Functional

Code

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');
}