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()

File

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

Class

AssetResolverTest
@coversDefaultClass \Drupal\Core\Asset\AssetResolver[[api-linebreak]] @group Asset

Namespace

Drupal\Tests\Core\Asset

Code

public static function providerAttachedCssAssets() {
  $time = time();
  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.