function LibraryDependencyResolverTest::testGetMinimalRepresentativeSubsetInvalidInput

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

@covers ::getMinimalRepresentativeSubset

File

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

Class

LibraryDependencyResolverTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Asset%21LibraryDependencyResolver.php/class/LibraryDependencyResolver/11.x" title="Resolves the dependencies of asset (CSS/JavaScript) libraries." class="local">\Drupal\Core\Asset\LibraryDependencyResolver</a> @group Asset

Namespace

Drupal\Tests\Core\Asset

Code

public function testGetMinimalRepresentativeSubsetInvalidInput() : void {
    $this->expectException(\AssertionError::class);
    $this->expectExceptionMessage('$libraries can\'t contain duplicate items.');
    $this->libraryDependencyResolver
        ->getMinimalRepresentativeSubset([
        'test/no_deps_a',
        'test/no_deps_a',
    ]);
}

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