You are here

public function SecKitTestCase::testDisabledXContentTypeOptions in Security Kit 6

Tests disabled X-Content-Type-Options HTTP response header.

File

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

Class

SecKitTestCase
Functional tests for Security Kit.

Code

public function testDisabledXContentTypeOptions() {
  $form['seckit_xss[x_content_type][checkbox]'] = FALSE;
  $this
    ->drupalPost('admin/settings/seckit', $form, t('Save configuration'));
  $this
    ->assertFalse($this
    ->drupalGetHeader('X-Content-Type-Options'), t('X-Content-Type-Options is disabled.'));
}