You are here

function JavaScriptTestCase::testFooterHTML in SimpleTest 7

Test drupal_get_js() with a footer scope.

File

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

Class

JavaScriptTestCase
Tests for the JavaScript system.

Code

function testFooterHTML() {
  $inline = 'jQuery(function () { });';
  drupal_add_js($inline, array(
    'type' => 'inline',
    'scope' => 'footer',
  ));
  $javascript = drupal_get_js('footer');
  $this
    ->assertTrue(strpos($javascript, $inline) > 0, t('Rendered JavaScript footer returns the inline code.'));
}