1 common.test CommonJavaScriptTestCase::testDifferentWeight()

Test adding a JavaScript file with a different weight.

File

core/modules/simpletest/tests/common.test, line 1448
Tests for common.inc functionality.

Class

CommonJavaScriptTestCase
Tests for the JavaScript system.

Code

function testDifferentWeight() {
  $javascript = backdrop_add_js('core/misc/collapse.js', array('weight' => 2));
  $this->assertEqual($javascript['core/misc/collapse.js']['weight'], 2, 'Adding a JavaScript file with a different weight caches the given weight.');
}