Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / tests / Drupal / Tests / Component / FileCache / FileCacheFactoryTest.php
index 995f5fc8510ea6396b7e537579c2749e4546d171..f9195984341a9d8ceb54cc51100d9e2301e1cbc9 100644 (file)
@@ -59,7 +59,13 @@ class FileCacheFactoryTest extends TestCase {
    */
   public function testGetNoPrefix() {
     FileCacheFactory::setPrefix(NULL);
-    $this->setExpectedException(\InvalidArgumentException::class, 'Required prefix configuration is missing');
+    if (method_exists($this, 'expectException')) {
+      $this->expectException(\InvalidArgumentException::class);
+      $this->expectExceptionMessage('Required prefix configuration is missing');
+    }
+    else {
+      $this->setExpectedException(\InvalidArgumentException::class, 'Required prefix configuration is missing');
+    }
     FileCacheFactory::get('test_foo_settings', []);
   }