1 common.test CommonCascadingStylesheetsTestCase::testRenderExternal()

Tests rendering an external stylesheet.

File

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

Class

CommonCascadingStylesheetsTestCase
Test the Backdrop CSS system.

Code

function testRenderExternal() {
  $css = 'http://example.com/style.css';
  backdrop_add_css($css, 'external');
  $styles = backdrop_get_css();
  // Stylesheet URL may be the href of a LINK tag or in an @import statement
  // of a STYLE tag.
  $this->assertTrue(strpos($styles, 'href="' . $css) > 0 || strpos($styles, '@import url("' . $css . '")') > 0, 'Rendering an external CSS file.');
}