function JavaScriptTestCase::testReset
7.x common.test | JavaScriptTestCase::testReset() |
Test to see if resetting the JavaScript empties the cache.
File
- drupal-7.x/
modules/ simpletest/ tests/ common.test, line 1312 - Tests for common.inc functionality.
Class
- JavaScriptTestCase
- Tests for the JavaScript system.
Code
function testReset() {
drupal_add_js('misc/collapse.js');
drupal_static_reset('drupal_add_js');
$this->assertEqual(array(), drupal_add_js(), 'Resetting the JavaScript correctly empties the cache.');
}