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::providerTestClean()
- 6.0.x advagg_js_minify/tests/src/Kernel/Asset/JsMinifierUnitTest.php \Drupal\Tests\advagg_js_minify\Kernel\Asset\JsMinifierUnitTest::providerTestClean()
- 8.x-3.x advagg_js_minify/tests/src/Kernel/Asset/JsMinifierUnitTest.php \Drupal\Tests\advagg_js_minify\Kernel\Asset\JsMinifierUnitTest::providerTestClean()
Provides data for the JS asset cleaning test.
@returns array An array of test data.
Voir aussi
\Drupal\Core\Asset\JsOptimizer::clean()
Fichier
-
advagg_js_minify/
tests/ src/ Kernel/ Asset/ JsMinifierUnitTest.php, line 55
Classe
- JsMinifierUnitTest
- Tests the JS asset minifier.
Namespace
Drupal\Tests\advagg_js_minify\Kernel\AssetCode
public function providerTestClean() {
$dir = dirname(__FILE__) . '/js_test_files/';
return [
// File. Tests:
// - Stripped sourceMappingURL with comment # syntax.
0 => [
file_get_contents($dir . 'source_mapping_url.min.js'),
file_get_contents($dir . 'source_mapping_url.min.js.optimized.js'),
],
// File. Tests:
// - Stripped sourceMappingURL with comment @ syntax.
1 => [
file_get_contents($dir . 'source_mapping_url_old.min.js'),
file_get_contents($dir . 'source_mapping_url_old.min.js.optimized.js'),
],
// File. Tests:
// - Stripped sourceURL with comment # syntax.
2 => [
file_get_contents($dir . 'source_url.min.js'),
file_get_contents($dir . 'source_url.min.js.optimized.js'),
],
// File. Tests:
// - Stripped sourceURL with comment @ syntax.
3 => [
file_get_contents($dir . 'source_url_old.min.js'),
file_get_contents($dir . 'source_url_old.min.js.optimized.js'),
],
];
}