function JavaScriptTestCase::testDifferentGroup
Test adding a JavaScript file with a different group.
File
-
modules/
simpletest/ tests/ common.test, line 1823
Class
- JavaScriptTestCase
- Tests for the JavaScript system.
Code
function testDifferentGroup() {
$javascript = drupal_add_js('misc/collapse.js', array(
'group' => JS_THEME,
));
$this->assertEqual($javascript['misc/collapse.js']['group'], JS_THEME, 'Adding a JavaScript file with a different group caches the given group.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.