public function SecKitTestCaseTest::testXframeOptionsIsDeny in Security Kit 2.x
Same name and namespace in other branches
- 8 tests/src/Functional/SecKitTestCaseTest.php \Drupal\Tests\seckit\Functional\SecKitTestCaseTest::testXframeOptionsIsDeny()
Tests set to DENY X-Frame-Options HTTP response header.
File
- tests/
src/ Functional/ SecKitTestCaseTest.php, line 462
Class
- SecKitTestCaseTest
- Functional tests for Security Kit.
Namespace
Drupal\Tests\seckit\FunctionalCode
public function testXframeOptionsIsDeny() {
$form['seckit_clickjacking[x_frame]'] = SeckitInterface::X_FRAME_DENY;
$this
->drupalPostForm('admin/config/system/seckit', $form, t('Save configuration'));
$this
->assertSession()
->responseHeaderEquals('X-Frame-Options', 'DENY');
}