Same name in other branches
- 5.0.x advagg_js_minify/tests/src/Kernel/Asset/JsMinifierUnitTest.php \Drupal\Tests\advagg_js_minify\Kernel\Asset\JsMinifierUnitTest::testMinifyJsqueeze()
- 8.x-3.x advagg_js_minify/tests/src/Kernel/Asset/JsMinifierUnitTest.php \Drupal\Tests\advagg_js_minify\Kernel\Asset\JsMinifierUnitTest::testMinifyJsqueeze()
- 8.x-4.x advagg_js_minify/tests/src/Kernel/Asset/JsMinifierUnitTest.php \Drupal\Tests\advagg_js_minify\Kernel\Asset\JsMinifierUnitTest::testMinifyJsqueeze()
Tests minification of a JS Asset with JSqueeze.
@dataProvider providerTestMinification
Paramètres
array $js_asset: An fake asset array with the filepath to pass to the minifier.
string $contents: The asset string contents to be minified.
Fichier
-
advagg_js_minify/
tests/ src/ Kernel/ Asset/ JsMinifierUnitTest.php, line 177
Classe
- JsMinifierUnitTest
- Tests the JS asset minifier.
Namespace
Drupal\Tests\advagg_js_minify\Kernel\AssetCode
public function testMinifyJsqueeze(array $js_asset, $contents) {
$this->config('advagg_js_minify.settings')
->set('minifier', 5)
->save();
$expected = file_get_contents($js_asset['data'] . '.jsqueeze.js');
$this->assertEquals($expected, $this->optimizer
->optimize($contents, $js_asset, []));
}