You are here

function JavaScriptTestCase::testNoCache in SimpleTest 7

Test drupal_add_js() sets preproccess to false when cache is set to false.

File

tests/common.test, line 1066
Tests for common.inc functionality.

Class

JavaScriptTestCase
Tests for the JavaScript system.

Code

function testNoCache() {
  $javascript = drupal_add_js('misc/collapse.js', array(
    'cache' => FALSE,
  ));
  $this
    ->assertFalse($javascript['misc/collapse.js']['preprocess'], t('Setting cache to FALSE sets proprocess to FALSE when adding JavaScript.'));
}