1 common.test CommonJavaScriptTestCase::testFooterHTML()

Test backdrop_get_js() with a footer scope.

File

core/modules/simpletest/tests/common.test, line 1488
Tests for common.inc functionality.

Class

CommonJavaScriptTestCase
Tests for the JavaScript system.

Code

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