You are here

public function JsMinifierUnitTest::providerTestMinification in Advanced CSS/JS Aggregation 8.4

Same name and namespace in other branches
  1. 8.3 advagg_js_minify/tests/src/Kernel/Asset/JsMinifierUnitTest.php \Drupal\Tests\advagg_js_minify\Kernel\Asset\JsMinifierUnitTest::providerTestMinification()

Provides data for the JS asset optimize test.

@returns array An array of test data.

See also

\Drupal\Core\Asset\JsOptimizer::optimize()

File

advagg_js_minify/tests/src/Kernel/Asset/JsMinifierUnitTest.php, line 107

Class

JsMinifierUnitTest
Tests the JS asset minifier.

Namespace

Drupal\Tests\advagg_js_minify\Kernel\Asset

Code

public function providerTestMinification() {
  $path = dirname(__FILE__) . '/js_test_files/';
  return [
    [
      [
        'data' => $path . 'drupal.js',
      ],
      file_get_contents($path . 'drupal.js'),
    ],
    [
      [
        'data' => $path . 'ajax.js',
      ],
      file_get_contents($path . 'ajax.js'),
    ],
    [
      [
        'data' => $path . 'ToolbarVisualView.js',
      ],
      file_get_contents($path . 'ToolbarVisualView.js'),
    ],
  ];
}