public function SecKitTestCase::testXFrameOptionsIsAllowFrom in Security Kit 7
Same name and namespace in other branches
- 6 seckit.test \SecKitTestCase::testXFrameOptionsIsAllowFrom()
Tests set to ALLOW-FROM X-Frame-Options HTTP response header.
File
- ./
seckit.test, line 469 - 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/config/system/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.'));
}