Same name in other branches
- 6.0.x advagg_js_minify/tests/src/Kernel/Asset/JsMinifierUnitTest.php \Drupal\Tests\advagg_js_minify\Kernel\Asset\JsMinifierUnitTest::testMinifyJsminPlus()
- 8.x-3.x advagg_js_minify/tests/src/Kernel/Asset/JsMinifierUnitTest.php \Drupal\Tests\advagg_js_minify\Kernel\Asset\JsMinifierUnitTest::testMinifyJsminPlus()
- 8.x-4.x advagg_js_minify/tests/src/Kernel/Asset/JsMinifierUnitTest.php \Drupal\Tests\advagg_js_minify\Kernel\Asset\JsMinifierUnitTest::testMinifyJsminPlus()
Tests minification of a JS Asset with JSMinplus.
@dataProvider providerTestMinification
Parameters
array $js_asset: An fake asset array with the filepath to pass to the minifier.
string $contents: The asset string contents to be minified.
File
-
advagg_js_minify/
tests/ src/ Kernel/ Asset/ JsMinifierUnitTest.php, line 161
Class
- JsMinifierUnitTest
- Tests the JS asset minifier.
Namespace
Drupal\Tests\advagg_js_minify\Kernel\AssetCode
public function testMinifyJsminPlus(array $js_asset, $contents) {
$this->config('advagg_js_minify.settings')
->set('minifier', 1)
->save();
$expected = file_get_contents($js_asset['data'] . '.jsminplus.js');
$this->assertEquals($expected, $this->optimizer
->optimize($contents, $js_asset, []));
}