1 common.test | CommonJavaScriptTestCase::testAddExternal() |
Tests adding an external JavaScript File.
File
- core/
modules/ simpletest/ tests/ common.test, line 1413 - Tests for common.inc functionality.
Class
- CommonJavaScriptTestCase
- Tests for the JavaScript system.
Code
function testAddExternal() {
$path = 'http://example.com/script.js';
$javascript = backdrop_add_js($path, 'external');
$this->assertTrue(array_key_exists('http://example.com/script.js', $javascript), 'Added an external JavaScript file.');
}