public function AssetResolverTest::testGetJsAssets in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php \Drupal\Tests\Core\Asset\AssetResolverTest::testGetJsAssets()
- 9 core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php \Drupal\Tests\Core\Asset\AssetResolverTest::testGetJsAssets()
@covers ::getJsAssets @dataProvider providerAttachedAssets
File
- core/
tests/ Drupal/ Tests/ Core/ Asset/ AssetResolverTest.php, line 125 - Contains \Drupal\Tests\Core\Asset\AssetResolverTest.
Class
- AssetResolverTest
- @coversDefaultClass \Drupal\Core\Asset\AssetResolver @group Asset
Namespace
Drupal\Tests\Core\AssetCode
public function testGetJsAssets(AttachedAssetsInterface $assets_a, AttachedAssetsInterface $assets_b, $expected_cache_item_count) {
$this->assetResolver
->getJsAssets($assets_a, FALSE);
$this->assetResolver
->getJsAssets($assets_b, FALSE);
$this
->assertCount($expected_cache_item_count, $this->cache
->getAllCids());
$this->assetResolver
->getJsAssets($assets_a, FALSE);
$this->assetResolver
->getJsAssets($assets_b, FALSE);
$this
->assertCount($expected_cache_item_count * 2, $this->cache
->getAllCids());
}