public function SecKitTestCase::testXFrameOptionsIsAllowFrom in Security Kit 6
Same name and namespace in other branches
- 7 seckit.test \SecKitTestCase::testXFrameOptionsIsAllowFrom()
Tests set to Allow-From X-Frame-Options HTTP response header.
File
- ./
seckit.test, line 278 - Tests for Security Kit module.
Class
- SecKitTestCase
- Functional tests for Security Kit.
Code
public function testXFrameOptionsIsAllowFrom() {
$form['seckit_clickjacking[x_frame]'] = SECKIT_X_FRAME_ALLOW_FROM;
$form['seckit_clickjacking[x_frame_allow_from]'] = 'http://www.google.com';
$this
->drupalPost('admin/settings/seckit', $form, t('Save configuration'));
$this
->assertEqual('Allow-From: http://www.google.com', $this
->drupalGetHeader('X-Frame-Options'), t('X-Frame-Options is set to Allow-From.'));
}