public function FlysystemServiceProviderTest::testSwappingCssServices in Flysystem 3.x
Same name and namespace in other branches
- 8 tests/src/Unit/FlysystemServiceProviderTest.php \Drupal\Tests\flysystem\Unit\FlysystemServiceProviderTest::testSwappingCssServices()
- 2.0.x tests/src/Unit/FlysystemServiceProviderTest.php \Drupal\Tests\flysystem\Unit\FlysystemServiceProviderTest::testSwappingCssServices()
- 3.0.x tests/src/Unit/FlysystemServiceProviderTest.php \Drupal\Tests\flysystem\Unit\FlysystemServiceProviderTest::testSwappingCssServices()
@covers \Drupal\flysystem\FlysystemServiceProvider
File
- tests/
src/ Unit/ FlysystemServiceProviderTest.php, line 114
Class
- FlysystemServiceProviderTest
- @coversDefaultClass \Drupal\flysystem\FlysystemServiceProvider @group flysystem
Namespace
Drupal\Tests\flysystem\UnitCode
public function testSwappingCssServices() {
// Test swapping the asset dumper.
$this->container
->register('asset.css.dumper', AssetDumper::class);
$this->container
->register('asset.css.collection_optimizer', CssCollectionOptimizer::class);
$this->container
->register('asset.css.optimizer', CssOptimizer::class);
new Settings([
'flysystem' => [
'testscheme' => [
'driver' => 'whatever',
'serve_css' => TRUE,
],
],
]);
(new FlysystemServiceProvider())
->register($this->container);
$this
->assertSame(FlysystemAssetDumper::class, $this->container
->getDefinition('asset.css.dumper')
->getClass());
$this
->assertSame(FlysystemCssCollectionOptimizer::class, $this->container
->getDefinition('asset.css.collection_optimizer')
->getClass());
$this
->assertSame(FlysystemCssOptimizer::class, $this->container
->getDefinition('asset.css.optimizer')
->getClass());
}