function AssetOptimizationTest::replaceFileNamePrefix
Same name in other branches
- 11.x core/tests/Drupal/FunctionalTests/Asset/AssetOptimizationTest.php \Drupal\FunctionalTests\Asset\AssetOptimizationTest::replaceFileNamePrefix()
Replaces the filename prefix in the given URL.
Parameters
string $url: The source URL.
Return value
string The URL with the file name prefix replaced.
1 call to AssetOptimizationTest::replaceFileNamePrefix()
- AssetOptimizationTest::assertInvalidAggregates in core/
tests/ Drupal/ FunctionalTests/ Asset/ AssetOptimizationTest.php - Asserts the aggregate when it is invalid.
File
-
core/
tests/ Drupal/ FunctionalTests/ Asset/ AssetOptimizationTest.php, line 239
Class
- AssetOptimizationTest
- Tests asset aggregation.
Namespace
Drupal\FunctionalTests\AssetCode
protected function replaceFileNamePrefix(string $url) : string {
return str_replace([
'/css_',
'/js_',
], '/xyz_', $url);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.