function AssetResolverTest::testGetCssAssets
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php \Drupal\Tests\Core\Asset\AssetResolverTest::testGetCssAssets()
- 8.9.x core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php \Drupal\Tests\Core\Asset\AssetResolverTest::testGetCssAssets()
- 11.x core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php \Drupal\Tests\Core\Asset\AssetResolverTest::testGetCssAssets()
@covers ::getCssAssets @dataProvider providerAttachedCssAssets
File
-
core/
tests/ Drupal/ Tests/ Core/ Asset/ AssetResolverTest.php, line 171
Class
- AssetResolverTest
- @coversDefaultClass \Drupal\Core\Asset\AssetResolver @group Asset
Namespace
Drupal\Tests\Core\AssetCode
public function testGetCssAssets(AttachedAssetsInterface $assets_a, AttachedAssetsInterface $assets_b, $expected_css_cache_item_count) : void {
$map = [
[
'core',
'drupal',
$this->libraries['drupal'],
],
[
'core',
'jquery',
$this->libraries['jquery'],
],
[
'llama',
'css',
$this->libraries['llama'],
],
[
'piggy',
'css',
$this->libraries['piggy'],
],
];
$this->libraryDiscovery
->method('getLibraryByName')
->willReturnMap($map);
$this->assetResolver
->getCssAssets($assets_a, FALSE, $this->english);
$this->assetResolver
->getCssAssets($assets_b, FALSE, $this->english);
$this->assertCount($expected_css_cache_item_count, $this->cache
->getAllCids());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.