function AssetResolverTest::providerAttachedCssAssets

Same name in other branches
  1. 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 216

Class

AssetResolverTest
@coversDefaultClass \Drupal\Core\Asset\AssetResolver @group Asset

Namespace

Drupal\Tests\Core\Asset

Code

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