You are here

public function ItCookieComplianceTestCase::testJavascriptBlocking in IT Cookie Compliance 7

Tests whether javascripts are been blocked correctly.

File

./it_cookie_compliance.test, line 38
IT Cookie Compliance module test file.

Class

ItCookieComplianceTestCase
Tests the functionality of the Simpletest example content type.

Code

public function testJavascriptBlocking() {
  $this
    ->drupalGet('node');
  $this
    ->assertNoRaw('jquery.once.js', 'Checking if jquery javascript has been removed');
  $this
    ->assertRaw('drupal.js', 'Checking if drupal javascript has not been removed');

  // Set block to /misc/jquery.once.js and misc/drupal.js
  variable_set('it_cookie_compliance_javascript', 'jquery,drupal');
  $this
    ->drupalGet('');
  $this
    ->assertNoRaw('drupal.js', 'Checking if drupal javascript has been removed after adding it to options');
}