function LibraryDependencyResolverTest::providerTestGetLibrariesWithDependencies

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php \Drupal\Tests\Core\Asset\LibraryDependencyResolverTest::providerTestGetLibrariesWithDependencies()
  2. 8.9.x core/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php \Drupal\Tests\Core\Asset\LibraryDependencyResolverTest::providerTestGetLibrariesWithDependencies()
  3. 11.x core/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php \Drupal\Tests\Core\Asset\LibraryDependencyResolverTest::providerTestGetLibrariesWithDependencies()

Provides test data for ::testGetLibrariesWithDependencies().

File

core/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php, line 76

Class

LibraryDependencyResolverTest
@coversDefaultClass \Drupal\Core\Asset\LibraryDependencyResolver @group Asset

Namespace

Drupal\Tests\Core\Asset

Code

public static function providerTestGetLibrariesWithDependencies() {
    return [
        // Empty list of libraries.
[
            [],
            [],
        ],
        // Without dependencies.
[
            [
                'test/no_deps_a',
            ],
            [
                'test/no_deps_a',
            ],
        ],
        [
            [
                'test/no_deps_a',
                'test/no_deps_b',
            ],
            [
                'test/no_deps_a',
                'test/no_deps_b',
            ],
        ],
        [
            [
                'test/no_deps_b',
                'test/no_deps_a',
            ],
            [
                'test/no_deps_b',
                'test/no_deps_a',
            ],
        ],
        // Single-level (direct) dependencies.
[
            [
                'test/deps_a',
            ],
            [
                'test/no_deps_a',
                'test/deps_a',
            ],
        ],
        [
            [
                'test/deps_b',
            ],
            [
                'test/no_deps_a',
                'test/no_deps_b',
                'test/deps_b',
            ],
        ],
        [
            [
                'test/deps_c',
            ],
            [
                'test/no_deps_b',
                'test/no_deps_a',
                'test/deps_c',
            ],
        ],
        [
            [
                'test/deps_a',
                'test/deps_b',
            ],
            [
                'test/no_deps_a',
                'test/deps_a',
                'test/no_deps_b',
                'test/deps_b',
            ],
        ],
        [
            [
                'test/deps_a',
                'test/deps_c',
            ],
            [
                'test/no_deps_a',
                'test/deps_a',
                'test/no_deps_b',
                'test/deps_c',
            ],
        ],
        [
            [
                'test/deps_a',
                'test/deps_b',
                'test/deps_c',
            ],
            [
                'test/no_deps_a',
                'test/deps_a',
                'test/no_deps_b',
                'test/deps_b',
                'test/deps_c',
            ],
        ],
        [
            [
                'test/deps_b',
                'test/deps_a',
            ],
            [
                'test/no_deps_a',
                'test/no_deps_b',
                'test/deps_b',
                'test/deps_a',
            ],
        ],
        [
            [
                'test/deps_b',
                'test/deps_c',
            ],
            [
                'test/no_deps_a',
                'test/no_deps_b',
                'test/deps_b',
                'test/deps_c',
            ],
        ],
        [
            [
                'test/deps_c',
                'test/deps_b',
            ],
            [
                'test/no_deps_b',
                'test/no_deps_a',
                'test/deps_c',
                'test/deps_b',
            ],
        ],
        // Multi-level (indirect) dependencies.
[
            [
                'test/nested_deps_a',
            ],
            [
                'test/no_deps_a',
                'test/deps_a',
                'test/nested_deps_a',
            ],
        ],
        [
            [
                'test/nested_deps_b',
            ],
            [
                'test/no_deps_a',
                'test/deps_a',
                'test/nested_deps_a',
                'test/nested_deps_b',
            ],
        ],
        [
            [
                'test/nested_deps_c',
            ],
            [
                'test/no_deps_a',
                'test/deps_a',
                'test/nested_deps_a',
                'test/nested_deps_b',
                'test/nested_deps_c',
            ],
        ],
        [
            [
                'test/nested_deps_a',
                'test/nested_deps_b',
            ],
            [
                'test/no_deps_a',
                'test/deps_a',
                'test/nested_deps_a',
                'test/nested_deps_b',
            ],
        ],
        [
            [
                'test/nested_deps_b',
                'test/nested_deps_a',
            ],
            [
                'test/no_deps_a',
                'test/deps_a',
                'test/nested_deps_a',
                'test/nested_deps_b',
            ],
        ],
        [
            [
                'test/nested_deps_a',
                'test/nested_deps_c',
            ],
            [
                'test/no_deps_a',
                'test/deps_a',
                'test/nested_deps_a',
                'test/nested_deps_b',
                'test/nested_deps_c',
            ],
        ],
        [
            [
                'test/nested_deps_b',
                'test/nested_deps_c',
            ],
            [
                'test/no_deps_a',
                'test/deps_a',
                'test/nested_deps_a',
                'test/nested_deps_b',
                'test/nested_deps_c',
            ],
        ],
        [
            [
                'test/nested_deps_c',
                'test/nested_deps_a',
            ],
            [
                'test/no_deps_a',
                'test/deps_a',
                'test/nested_deps_a',
                'test/nested_deps_b',
                'test/nested_deps_c',
            ],
        ],
        [
            [
                'test/nested_deps_a',
                'test/nested_deps_b',
                'test/nested_deps_c',
            ],
            [
                'test/no_deps_a',
                'test/deps_a',
                'test/nested_deps_a',
                'test/nested_deps_b',
                'test/nested_deps_c',
            ],
        ],
        [
            [
                'test/nested_deps_a',
                'test/nested_deps_c',
                'test/nested_deps_b',
            ],
            [
                'test/no_deps_a',
                'test/deps_a',
                'test/nested_deps_a',
                'test/nested_deps_b',
                'test/nested_deps_c',
            ],
        ],
        [
            [
                'test/nested_deps_b',
                'test/nested_deps_a',
                'test/nested_deps_c',
            ],
            [
                'test/no_deps_a',
                'test/deps_a',
                'test/nested_deps_a',
                'test/nested_deps_b',
                'test/nested_deps_c',
            ],
        ],
        [
            [
                'test/nested_deps_b',
                'test/nested_deps_c',
                'test/nested_deps_a',
            ],
            [
                'test/no_deps_a',
                'test/deps_a',
                'test/nested_deps_a',
                'test/nested_deps_b',
                'test/nested_deps_c',
            ],
        ],
        [
            [
                'test/nested_deps_c',
                'test/nested_deps_a',
                'test/nested_deps_b',
            ],
            [
                'test/no_deps_a',
                'test/deps_a',
                'test/nested_deps_a',
                'test/nested_deps_b',
                'test/nested_deps_c',
            ],
        ],
        [
            [
                'test/nested_deps_c',
                'test/nested_deps_b',
                'test/nested_deps_a',
            ],
            [
                'test/no_deps_a',
                'test/deps_a',
                'test/nested_deps_a',
                'test/nested_deps_b',
                'test/nested_deps_c',
            ],
        ],
        // Complex dependencies, combining the above, with many intersections.
[
            [
                'test/deps_c',
                'test/nested_deps_b',
            ],
            [
                'test/no_deps_b',
                'test/no_deps_a',
                'test/deps_c',
                'test/deps_a',
                'test/nested_deps_a',
                'test/nested_deps_b',
            ],
        ],
        [
            [
                'test/no_deps_a',
                'test/deps_c',
                'test/nested_deps_b',
            ],
            [
                'test/no_deps_a',
                'test/no_deps_b',
                'test/deps_c',
                'test/deps_a',
                'test/nested_deps_a',
                'test/nested_deps_b',
            ],
        ],
        [
            [
                'test/nested_deps_b',
                'test/deps_c',
                'test/no_deps_c',
            ],
            [
                'test/no_deps_a',
                'test/deps_a',
                'test/nested_deps_a',
                'test/nested_deps_b',
                'test/no_deps_b',
                'test/deps_c',
                'test/no_deps_c',
            ],
        ],
    ];
}

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