function CascadingStylesheetsTest::testRenderInlineNoPreprocess

Tests rendering inline stylesheets with preprocessing off.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php, line 132
Definition of Drupal\system\Tests\Common\CascadingStylesheetsTest.

Class

CascadingStylesheetsTest
Tests the Drupal CSS system.

Namespace

Drupal\system\Tests\Common

Code

function testRenderInlineNoPreprocess() {
  $css = 'body { padding: 0px; }';
  drupal_add_css($css, array(
    'type' => 'inline',
    'preprocess' => FALSE,
  ));
  $styles = drupal_get_css();
  $this
    ->assertTrue(strpos($styles, $css) > 0, 'Rendering non-preprocessed inline CSS adds it to the page.');
}