diff core/tests/Drupal/Tests/Component/Utility/HtmlTest.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 7a779792577d
children
line wrap: on
line diff
--- a/core/tests/Drupal/Tests/Component/Utility/HtmlTest.php	Mon Apr 23 09:33:26 2018 +0100
+++ b/core/tests/Drupal/Tests/Component/Utility/HtmlTest.php	Mon Apr 23 09:46:53 2018 +0100
@@ -343,7 +343,12 @@
    * @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);
   }