public function SecKitTestCase::testJSCSSNoscript in Security Kit 7
Same name and namespace in other branches
- 6 seckit.test \SecKitTestCase::testJSCSSNoscript()
Tests JS + CSS + Noscript protection.
File
- ./
seckit.test, line 480 - 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/config/system/seckit', $form, t('Save configuration'));
// Reset settings.
_seckit_get_options(TRUE);
// Get the new JS code.
$code = _seckit_get_js_css_noscript_code();
$this
->assertRaw($code, t('JavaScript + CSS + Noscript protection is loaded.'));
}