You are here

public function LibraryDependencyResolverTest::providerTestGetMinimalRepresentativeSubset 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::providerTestGetMinimalRepresentativeSubset()
  2. 9 core/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php \Drupal\Tests\Core\Asset\LibraryDependencyResolverTest::providerTestGetMinimalRepresentativeSubset()

Provides test data for ::testGetMinimalRepresentativeSubset().

File

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

Class

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

Namespace

Drupal\Tests\Core\Asset

Code

public function providerTestGetMinimalRepresentativeSubset() {
  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/deps_a',
      ],
    ],
    [
      [
        'test/deps_b',
      ],
      [
        'test/deps_b',
      ],
    ],
    [
      [
        'test/deps_c',
      ],
      [
        'test/deps_c',
      ],
    ],
    [
      [
        'test/deps_a',
        'test/deps_b',
      ],
      [
        'test/deps_a',
        'test/deps_b',
      ],
    ],
    [
      [
        'test/deps_a',
        'test/deps_c',
      ],
      [
        'test/deps_a',
        'test/deps_c',
      ],
    ],
    [
      [
        'test/deps_a',
        'test/deps_b',
        'test/deps_c',
      ],
      [
        'test/deps_a',
        'test/deps_b',
        'test/deps_c',
      ],
    ],
    [
      [
        'test/deps_b',
        'test/deps_a',
      ],
      [
        'test/deps_b',
        'test/deps_a',
      ],
    ],
    [
      [
        'test/deps_b',
        'test/deps_c',
      ],
      [
        'test/deps_b',
        'test/deps_c',
      ],
    ],
    [
      [
        'test/deps_c',
        'test/deps_b',
      ],
      [
        'test/deps_c',
        'test/deps_b',
      ],
    ],
    // Multi-level (indirect) dependencies.
    [
      [
        'test/nested_deps_a',
      ],
      [
        'test/nested_deps_a',
      ],
    ],
    [
      [
        'test/nested_deps_b',
      ],
      [
        'test/nested_deps_b',
      ],
    ],
    [
      [
        'test/nested_deps_c',
      ],
      [
        'test/nested_deps_c',
      ],
    ],
    [
      [
        'test/nested_deps_a',
        'test/nested_deps_b',
      ],
      [
        'test/nested_deps_b',
      ],
    ],
    [
      [
        'test/nested_deps_b',
        'test/nested_deps_a',
      ],
      [
        'test/nested_deps_b',
      ],
    ],
    [
      [
        'test/nested_deps_a',
        'test/nested_deps_c',
      ],
      [
        'test/nested_deps_c',
      ],
    ],
    [
      [
        'test/nested_deps_b',
        'test/nested_deps_c',
      ],
      [
        'test/nested_deps_c',
      ],
    ],
    [
      [
        'test/nested_deps_c',
        'test/nested_deps_a',
      ],
      [
        'test/nested_deps_c',
      ],
    ],
    [
      [
        'test/nested_deps_a',
        'test/nested_deps_b',
        'test/nested_deps_c',
      ],
      [
        'test/nested_deps_c',
      ],
    ],
    [
      [
        'test/nested_deps_a',
        'test/nested_deps_c',
        'test/nested_deps_b',
      ],
      [
        'test/nested_deps_c',
      ],
    ],
    [
      [
        'test/nested_deps_b',
        'test/nested_deps_a',
        'test/nested_deps_c',
      ],
      [
        'test/nested_deps_c',
      ],
    ],
    [
      [
        'test/nested_deps_b',
        'test/nested_deps_c',
        'test/nested_deps_a',
      ],
      [
        'test/nested_deps_c',
      ],
    ],
    [
      [
        'test/nested_deps_c',
        '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/nested_deps_c',
      ],
    ],
    // Complex dependencies, combining the above, with many intersections.
    [
      [
        'test/deps_c',
        'test/nested_deps_b',
      ],
      [
        'test/deps_c',
        'test/nested_deps_b',
      ],
    ],
    [
      [
        'test/no_deps_a',
        'test/deps_c',
        'test/nested_deps_b',
      ],
      [
        'test/deps_c',
        'test/nested_deps_b',
      ],
    ],
    [
      [
        'test/nested_deps_b',
        'test/deps_c',
        'test/no_deps_c',
      ],
      [
        'test/nested_deps_b',
        'test/deps_c',
        'test/no_deps_c',
      ],
    ],
  ];
}