You are here

public function SecKitTestCase::testXXSSProtectionIs1 in Security Kit 6

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

Tests set to 1; mode=block X-XSS-Protection HTTP response header.

File

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

Class

SecKitTestCase
Functional tests for Security Kit.

Code

public function testXXSSProtectionIs1() {
  $form['seckit_xss[x_xss][select]'] = SECKIT_X_XSS_1;
  $this
    ->drupalPost('admin/settings/seckit', $form, t('Save configuration'));
  $this
    ->assertEqual('1; mode=block', $this
    ->drupalGetHeader('X-XSS-Protection'), t('X-XSS-Protection is set to 1; mode=block.'));
}