function AssetResolverTest::providerAttachedCssAssets

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php \Drupal\Tests\Core\Asset\AssetResolverTest::providerAttachedCssAssets()
  2. 10 core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php \Drupal\Tests\Core\Asset\AssetResolverTest::providerAttachedCssAssets()

File

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

Class

AssetResolverTest
Tests Drupal\Core\Asset\AssetResolver.

Namespace

Drupal\Tests\Core\Asset

Code

public static function providerAttachedCssAssets() : array {
  return [
    'one js only library and one css only library' => [
      (new AttachedAssets())->setAlreadyLoadedLibraries([])
        ->setLibraries([
        'core/drupal',
      ]),
      (new AttachedAssets())->setAlreadyLoadedLibraries([])
        ->setLibraries([
        'llama/css',
      ]),
      1,
    ],
    'two different css libraries' => [
      (new AttachedAssets())->setAlreadyLoadedLibraries([])
        ->setLibraries([
        'core/drupal',
        'llama/css',
      ]),
      (new AttachedAssets())->setAlreadyLoadedLibraries([])
        ->setLibraries([
        'piggy/css',
      ]),
      2,
    ],
  ];
}

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