function CssOptimizerUnitTest::setUpOptimizer
3 calls to CssOptimizerUnitTest::setUpOptimizer()
- CssOptimizerUnitTest::testOptimize in core/
tests/ Drupal/ Tests/ Core/ Asset/ CssOptimizerUnitTest.php - Tests optimizing a CSS asset group containing 'type' => 'file'.
- CssOptimizerUnitTest::testTypeExternal in core/
tests/ Drupal/ Tests/ Core/ Asset/ CssOptimizerUnitTest.php - Tests a CSS asset with 'type' => 'external'.
- CssOptimizerUnitTest::testTypeFilePreprocessingDisabled in core/
tests/ Drupal/ Tests/ Core/ Asset/ CssOptimizerUnitTest.php - Tests a file CSS asset with preprocessing disabled.
File
-
core/
tests/ Drupal/ Tests/ Core/ Asset/ CssOptimizerUnitTest.php, line 33
Class
- CssOptimizerUnitTest
- Tests the CSS asset optimizer.
Namespace
Drupal\Tests\Core\AssetCode
protected function setUpOptimizer() : void {
$this->fileUrlGenerator = $this->createStub(FileUrlGeneratorInterface::class);
$this->fileUrlGenerator
->method('generateString')
->willReturnCallback(function (string $uri) : string {
return 'generated-relative-url:' . $uri;
});
$this->optimizer = new CssOptimizer($this->fileUrlGenerator);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.