You are here

public function SecKitTestCase::testJSCSSNoscript in Security Kit 6

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

Tests JS + CSS + Noscript protection.

File

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

Class

SecKitTestCase
Functional tests for Security Kit.

Code

public function testJSCSSNoscript() {
  $form['seckit_clickjacking[js_css_noscript]'] = TRUE;
  $form['seckit_clickjacking[noscript_message]'] = 'Sorry, your JavaScript is disabled.';
  $this
    ->drupalPost('admin/settings/seckit', $form, t('Save configuration'));
  $code = _seckit_get_js_css_noscript_code();
  $this
    ->assertRaw($code, t('JavaScript + CSS + Noscript protection is loaded.'));
}