You are here

public function SecKitTestCase::testXXSSProtectionIsDisabled in Security Kit 7

Same name and namespace in other branches
  1. 6 seckit.test \SecKitTestCase::testXXSSProtectionIsDisabled()

Tests disabled X-XSS-Protection HTTP response header.

File

./seckit.test, line 341
Tests for Security Kit module.

Class

SecKitTestCase
Functional tests for Security Kit.

Code

public function testXXSSProtectionIsDisabled() {
  $form['seckit_xss[x_xss][select]'] = SECKIT_X_XSS_DISABLE;
  $this
    ->drupalPost('admin/config/system/seckit', $form, t('Save configuration'));
  $this
    ->assertFalse($this
    ->drupalGetHeader('X-XSS-Protection'), t('X-XSS-Protection is disabled.'));
}