You are here

public function LibraryDependencyResolverTest::providerTestGetLibrariesWithDependencies in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php \Drupal\Tests\Core\Asset\LibraryDependencyResolverTest::providerTestGetLibrariesWithDependencies()
  2. 9 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 70

Class

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

Namespace

Drupal\Tests\Core\Asset

Code

public 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',
      ],
    ],
  ];
}