function AssetOptimizationTest::testAssetAggregation
Same name and namespace in other branches
- 11.x core/tests/Drupal/FunctionalTests/Asset/AssetOptimizationTest.php \Drupal\FunctionalTests\Asset\AssetOptimizationTest::testAssetAggregation()
- 10 core/tests/Drupal/FunctionalTests/Asset/AssetOptimizationTest.php \Drupal\FunctionalTests\Asset\AssetOptimizationTest::testAssetAggregation()
Tests that asset aggregates are rendered and created on disk.
File
-
core/
tests/ Drupal/ FunctionalTests/ Asset/ AssetOptimizationTest.php, line 35
Class
- AssetOptimizationTest
- Tests asset aggregation.
Namespace
Drupal\FunctionalTests\AssetCode
public function testAssetAggregation() : void {
// Test aggregation with a custom file_assets_path.
$this->fileAssetsPath = $this->publicFilesDirectory . '/test-assets';
$settings['settings']['file_assets_path'] = (object) [
'value' => $this->fileAssetsPath,
'required' => TRUE,
];
$this->doTestAggregation($settings);
// Test aggregation with no configured file_assets_path or file_public_path,
// since tests run in a multisite, this tests multisite installs where
// settings.php is the default.
$this->fileAssetsPath = $this->publicFilesDirectory;
$settings['settings']['file_public_path'] = (object) [
'value' => NULL,
'required' => TRUE,
];
$settings['settings']['file_assets_path'] = (object) [
'value' => NULL,
'required' => TRUE,
];
$this->doTestAggregation($settings);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.