public function SecKitTestCase::testEnabledXContentTypeOptions in Security Kit 6
Tests enabled X-Content-Type-Options HTTP response header.
File
- ./
seckit.test, line 196 - Tests for Security Kit module.
Class
- SecKitTestCase
- Functional tests for Security Kit.
Code
public function testEnabledXContentTypeOptions() {
$form['seckit_xss[x_content_type][checkbox]'] = TRUE;
$this
->drupalPost('admin/settings/seckit', $form, t('Save configuration'));
$this
->assertEqual('nosniff', $this
->drupalGetHeader('X-Content-Type-Options'), t('X-Content-Type-Options is enabled and set to nosniff.'));
}