1 common.test CommonCascadingStylesheetsTestCase::testRenderInlinePreprocess()

Tests rendering inline stylesheets with preprocessing on.

File

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

Class

CommonCascadingStylesheetsTestCase
Test the Backdrop CSS system.

Code

function testRenderInlinePreprocess() {
  $css = 'body { padding: 0px; }';
  $css_preprocessed = '<style media="all">' . backdrop_load_stylesheet_content($css, TRUE) . '</style>';
  backdrop_add_css($css, array('type' => 'inline'));
  $styles = backdrop_get_css();
  $this->assertEqual(trim($styles), $css_preprocessed, 'Rendering preprocessed inline CSS adds it to the page.');
}