diff --git a/core/tests/Drupal/Tests/Core/Asset/JsOptimizerUnitTest.php b/core/tests/Drupal/Tests/Core/Asset/JsOptimizerUnitTest.php index c41f653..beb62eb 100644 --- a/core/tests/Drupal/Tests/Core/Asset/JsOptimizerUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Asset/JsOptimizerUnitTest.php @@ -5,7 +5,7 @@ * Contains \Drupal\system\Tests\Asset\JsOptimizerUnitTest. */ -namespace Drupal\Tests\Core\Asset { +namespace Drupal\Tests\Core\Asset; use Drupal\Core\Asset\JsOptimizer; use Drupal\Tests\UnitTestCase; @@ -39,45 +39,25 @@ function providerTestClean() { // File. Tests: // - Stripped sourceMappingURL with comment # syntax. 0 => array( - array( - 'type' => 'file', - 'media' => 'all', - 'data' => $path . 'source_mapping_url.min.js', - 'basename' => 'source_mapping_url.min.js', - ), + file_get_contents($path . 'source_mapping_url.min.js'), file_get_contents($path . 'source_mapping_url.min.js.optimized.js'), ), // File. Tests: // - Stripped sourceMappingURL with comment @ syntax. 1 => array( - array( - 'type' => 'file', - 'media' => 'all', - 'data' => $path . 'source_mapping_url_old.min.js', - 'basename' => 'source_mapping_url_old.min.js', - ), + file_get_contents($path . 'source_mapping_url_old.min.js'), file_get_contents($path . 'source_mapping_url_old.min.js.optimized.js'), ), // File. Tests: // - Stripped sourceURL with comment # syntax. 2 => array( - array( - 'type' => 'file', - 'media' => 'all', - 'data' => $path . 'source_url.min.js', - 'basename' => 'source_url.min.js', - ), + file_get_contents($path . 'source_url.min.js'), file_get_contents($path . 'source_url.min.js.optimized.js'), ), // File. Tests: // - Stripped sourceURL with comment @ syntax. 3 => array( - array( - 'type' => 'file', - 'media' => 'all', - 'data' => $path . 'source_url_old.min.js', - 'basename' => 'source_url_old.min.js', - ), + file_get_contents($path . 'source_url_old.min.js'), file_get_contents($path . 'source_url_old.min.js.optimized.js'), ), ); @@ -93,4 +73,3 @@ function testClean($js_asset, $expected) { } } -}