You are here

function JavaScriptTestCase::testAddExternal in SimpleTest 7

Tests adding an external JavaScript File.

File

tests/common.test, line 1005
Tests for common.inc functionality.

Class

JavaScriptTestCase
Tests for the JavaScript system.

Code

function testAddExternal() {
  $path = 'http://example.com/script.js';
  $javascript = drupal_add_js($path, 'external');
  $this
    ->assertTrue(array_key_exists('http://example.com/script.js', $javascript), t('Added an external JavaScript file.'));
}