function JavaScriptTestCase::testDifferentGroup in Drupal 7
Test adding a JavaScript file with a different group.
File
- modules/
simpletest/ tests/ common.test, line 1708 - Tests for common.inc functionality.
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.');
}