function JavaScriptTestCase::testNoCache

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

File

modules/simpletest/tests/common.test, line 1815

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'], 'Setting cache to FALSE sets proprocess to FALSE when adding JavaScript.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.