X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Ftests%2FDrupal%2FTests%2FComponent%2FPlugin%2FFactory%2FReflectionFactoryTest.php;fp=web%2Fcore%2Ftests%2FDrupal%2FTests%2FComponent%2FPlugin%2FFactory%2FReflectionFactoryTest.php;h=20d2f76edfc530208ec995ae2c6b62d465b3451d;hp=7e8fbefd1d1cb48b334caf6cf49bbcfcc3bb84e8;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php b/web/core/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php index 7e8fbefd1..20d2f76ed 100644 --- a/web/core/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php +++ b/web/core/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php @@ -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.