function CascadingStylesheetsTestCase::testRenderInlinePreprocess in SimpleTest 7
Tests rendering inline stylesheets with preprocessing on.
File
- tests/
common.test, line 527 - Tests for common.inc functionality.
Class
- CascadingStylesheetsTestCase
- Test the Drupal CSS system.
Code
function testRenderInlinePreprocess() {
$css = 'body { padding: 0px; }';
$css_preprocessed = '<style type="text/css">' . drupal_load_stylesheet_content($css, TRUE) . '</style>';
drupal_add_css($css, 'inline');
$styles = drupal_get_css();
$this
->assertEqual($styles, "\n" . $css_preprocessed, t('Rendering preprocessed inline CSS adds it to the page.'));
}