Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / tests / Drupal / Tests / Component / Utility / CryptTest.php
index c87628f75cda54a31005d1b61cadfba13acfffaf..80208ef294f52ac69af244a8fb5bfe3b2b3e35d5 100644 (file)
@@ -77,7 +77,12 @@ class CryptTest extends TestCase {
    *   Key to use in hashing process.
    */
   public function testHmacBase64Invalid($data, $key) {
-    $this->setExpectedException(\InvalidArgumentException::class);
+    if (method_exists($this, 'expectException')) {
+      $this->expectException('InvalidArgumentException');
+    }
+    else {
+      $this->setExpectedException('InvalidArgumentException');
+    }
     Crypt::hmacBase64($data, $key);
   }