Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / tests / Drupal / Tests / Core / Asset / LibraryDependencyResolverTest.php
index 40e18210800ba981de63faec7509b5236abc9ceb..bbd55a64beda01026772bb38c25bb2ec840374ad 100644 (file)
@@ -64,7 +64,6 @@ class LibraryDependencyResolverTest extends UnitTestCase {
     $this->libraryDependencyResolver = new LibraryDependencyResolver($this->libraryDiscovery);
   }
 
-
   /**
    * Provides test data for ::testGetLibrariesWithDependencies().
    */
@@ -169,4 +168,12 @@ class LibraryDependencyResolverTest extends UnitTestCase {
     $this->assertEquals($expected, $this->libraryDependencyResolver->getMinimalRepresentativeSubset($libraries));
   }
 
+  /**
+   * @covers ::getMinimalRepresentativeSubset
+   */
+  public function testGetMinimalRepresentativeSubsetInvalidInput() {
+    $this->setExpectedException(\AssertionError::class, '$libraries can\'t contain duplicate items.');
+    $this->libraryDependencyResolver->getMinimalRepresentativeSubset(['test/no_deps_a', 'test/no_deps_a']);
+  }
+
 }