1.20.x simpletest.module simpletest_js_alter(&$javascript)

Implements hook_js_alter().

File

modules/simpletest/simpletest.module, line 107
Provides testing functionality.

Code

function simpletest_js_alter(&$javascript) {
  // Since SimpleTest is a special use case for the table select, stick the
  // SimpleTest JavaScript above the table select.
  $simpletest = backdrop_get_path('module', 'simpletest') . '/js/simpletest.js';
  if (array_key_exists($simpletest, $javascript) && array_key_exists('core/misc/tableselect.js', $javascript)) {
    $javascript[$simpletest]['weight'] = $javascript['core/misc/tableselect.js']['weight'] - 1;
  }
}