You are here

public function SecKitTestCase::testXFrameOptionsIsSameOrigin in Security Kit 7

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

Tests set to SAMEORIGIN X-Frame-Options HTTP response header.

File

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

Class

SecKitTestCase
Functional tests for Security Kit.

Code

public function testXFrameOptionsIsSameOrigin() {
  $form['seckit_clickjacking[x_frame]'] = SECKIT_X_FRAME_SAMEORIGIN;
  $this
    ->drupalPost('admin/config/system/seckit', $form, t('Save configuration'));
  $this
    ->assertEqual('SAMEORIGIN', $this
    ->drupalGetHeader('X-Frame-Options'), t('X-Frame-Options is set to SAMEORIGIN.'));
}