You are here

public function CssCollectionOptimizerUnitTest::testCssImport in Drupal 10

Test that css imports with strange letters do not destroy the css output.

File

core/tests/Drupal/Tests/Core/Asset/CssCollectionOptimizerUnitTest.php, line 66

Class

CssCollectionOptimizerUnitTest
Tests the CSS asset optimizer.

Namespace

Drupal\Tests\Core\Asset

Code

public function testCssImport() {
  $this->optimizer
    ->optimize([
    'core/modules/system/tests/modules/common_test/common_test_css_import.css' => [
      'type' => 'file',
      'data' => 'core/modules/system/tests/modules/common_test/common_test_css_import.css',
      'preprocess' => TRUE,
    ],
    'core/modules/system/tests/modules/common_test/common_test_css_import_not_preprocessed.css' => [
      'type' => 'file',
      'data' => 'core/modules/system/tests/modules/common_test/common_test_css_import.css',
      'preprocess' => TRUE,
    ],
  ]);
  self::assertEquals(file_get_contents(__DIR__ . '/css_test_files/css_input_with_import.css.optimized.aggregated.css'), $this->dumperData);
}