function AssetResolverTest::testGetFontAssets

Same name and namespace in other branches
  1. main core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php \Drupal\Tests\Core\Asset\AssetResolverTest::testGetFontAssets()

Tests get font assets.

Attributes

#[DataProvider('providerAttachedFontAssets')]

File

core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php, line 282

Class

AssetResolverTest
Tests Drupal\Core\Asset\AssetResolver.

Namespace

Drupal\Tests\Core\Asset

Code

public function testGetFontAssets($libraries, $expected) : void {
  $assets = (new AttachedAssets())->setAlreadyLoadedLibraries([])
    ->setLibraries($libraries);
  $fonts = $this->assetResolver
    ->getFontAssets($assets, $this->english);
  $this->assertSame($expected, $fonts);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.