Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / tests / Drupal / Tests / Component / Utility / HtmlTest.php
index 1860e041050b337beb1bc81d46db38652aeea965..a8a8af0e6c355e3bc65a00a53472685678d8260c 100644 (file)
@@ -343,7 +343,12 @@ class HtmlTest extends TestCase {
    * @dataProvider providerTestTransformRootRelativeUrlsToAbsoluteAssertion
    */
   public function testTransformRootRelativeUrlsToAbsoluteAssertion($scheme_and_host) {
-    $this->setExpectedException(\AssertionError::class);
+    if (method_exists($this, 'expectException')) {
+      $this->expectException(\AssertionError::class);
+    }
+    else {
+      $this->setExpectedException(\AssertionError::class);
+    }
     Html::transformRootRelativeUrlsToAbsolute('', $scheme_and_host);
   }