JavaScriptTestCase::testDifferentWeight

7 common.test JavaScriptTestCase::testDifferentWeight()

Test adding a JavaScript file with a different weight.

File

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

Code

function testDifferentWeight() {
  $javascript = drupal_add_js('misc/collapse.js', array('weight' => 2));
  $this->assertEqual($javascript['misc/collapse.js']['weight'], 2, t('Adding a JavaScript file with a different weight caches the given weight.'));
}
Login or register to post comments