You are here

public function JsOptimizerUnitTest::testOptimize in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Asset/JsOptimizerUnitTest.php \Drupal\Tests\Core\Asset\JsOptimizerUnitTest::testOptimize()

Tests cleaning of a JS asset group containing 'type' => 'file'.

@dataProvider providerTestOptimize

File

core/tests/Drupal/Tests/Core/Asset/JsOptimizerUnitTest.php, line 122

Class

JsOptimizerUnitTest
Tests the JS asset optimizer.

Namespace

Drupal\Tests\Core\Asset

Code

public function testOptimize($js_asset, $expected) {
  $this
    ->assertEquals($expected, $this->optimizer
    ->optimize($js_asset));
}