You are here

public function CssMinifierUnitTest::testNoMinifier in Advanced CSS/JS Aggregation 8.4

Same name and namespace in other branches
  1. 8.3 advagg_css_minify/tests/src/Kernel/Asset/CssMinifierUnitTest.php \Drupal\Tests\advagg_css_minify\Kernel\Asset\CssMinifierUnitTest::testNoMinifier()

Tests running the minifier with the minifier disabled.

File

advagg_css_minify/tests/src/Kernel/Asset/CssMinifierUnitTest.php, line 41

Class

CssMinifierUnitTest
Tests the CSS asset minifier.

Namespace

Drupal\Tests\advagg_css_minify\Kernel\Asset

Code

public function testNoMinifier() {
  $this
    ->config('advagg_css_minify.settings')
    ->set('minifier', 0)
    ->save();
  $file = dirname(__FILE__) . '/css_test_files/css_input_without_import.css';
  $contents = file_get_contents($file);
  $this
    ->assertSame($contents, $this->optimizer
    ->optimize($contents, [], []));
}