public function AssetResolverTest::testGetCssAssets in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php \Drupal\Tests\Core\Asset\AssetResolverTest::testGetCssAssets()
@covers ::getCssAssets @dataProvider providerAttachedAssets @group legacy
Note the legacy group is used here because ActiveTheme::getStyleSheetsRemove() is called and is deprecated. As this code path will still be triggered until Drupal 9 we have to add the group. We do not trigger a silenced deprecation.
File
- core/
tests/ Drupal/ Tests/ Core/ Asset/ AssetResolverTest.php, line 124 - Contains \Drupal\Tests\Core\Asset\AssetResolverTest.
Class
- AssetResolverTest
- @coversDefaultClass \Drupal\Core\Asset\AssetResolver @group Asset
Namespace
Drupal\Tests\Core\AssetCode
public function testGetCssAssets(AttachedAssetsInterface $assets_a, AttachedAssetsInterface $assets_b, $expected_cache_item_count) {
$this->assetResolver
->getCssAssets($assets_a, FALSE);
$this->assetResolver
->getCssAssets($assets_b, FALSE);
$this
->assertCount($expected_cache_item_count, $this->cache
->getAllCids());
}