function JavaScriptTestCase::testDifferentWeight in SimpleTest 7
Test adding a JavaScript file with a different weight.
File
- tests/
common.test, line 1074 - Tests for common.inc functionality.
Class
- JavaScriptTestCase
- Tests for the JavaScript system.
Code
function testDifferentWeight() {
$javascript = drupal_add_js('misc/collapse.js', array(
'weight' => JS_THEME,
));
$this
->assertEqual($javascript['misc/collapse.js']['weight'], JS_THEME, t('Adding a JavaScript file with a different weight caches the given weight.'));
}