You are here

public function SecKitTestCase::testXFrameOptionsIsDeny in Security Kit 6

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

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

File

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

Class

SecKitTestCase
Functional tests for Security Kit.

Code

public function testXFrameOptionsIsDeny() {
  $form['seckit_clickjacking[x_frame]'] = SECKIT_X_FRAME_DENY;
  $this
    ->drupalPost('admin/settings/seckit', $form, t('Save configuration'));
  $this
    ->assertEqual('Deny', $this
    ->drupalGetHeader('X-Frame-Options'), t('X-Frame-Options is set to Deny.'));
}