Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / tests / Drupal / Tests / Component / Plugin / Factory / ReflectionFactoryTest.php
index 7e8fbefd1d1cb48b334caf6cf49bbcfcc3bb84e8..20d2f76edfc530208ec995ae2c6b62d465b3451d 100644 (file)
@@ -123,7 +123,12 @@ class ReflectionFactoryTest extends TestCase {
     // us to use one data set for this test method as well as
     // testCreateInstance().
     if ($plugin_id == 'arguments_no_constructor') {
-      $this->setExpectedException('\ReflectionException');
+      if (method_exists($this, 'expectException')) {
+        $this->expectException('\ReflectionException');
+      }
+      else {
+        $this->setExpectedException('\ReflectionException');
+      }
     }
 
     // Finally invoke getInstanceArguments() on our mocked factory.