X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Ftests%2FDrupal%2FTests%2FComponent%2FPlugin%2FDiscovery%2FStaticDiscoveryDecoratorTest.php;fp=web%2Fcore%2Ftests%2FDrupal%2FTests%2FComponent%2FPlugin%2FDiscovery%2FStaticDiscoveryDecoratorTest.php;h=5b010930922a17d25766ddc9b38d8b4b6e6deaa7;hp=a44721bd9b4e76d49f3981fcc6188cb35b08cf97;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/tests/Drupal/Tests/Component/Plugin/Discovery/StaticDiscoveryDecoratorTest.php b/web/core/tests/Drupal/Tests/Component/Plugin/Discovery/StaticDiscoveryDecoratorTest.php index a44721bd9..5b0109309 100644 --- a/web/core/tests/Drupal/Tests/Component/Plugin/Discovery/StaticDiscoveryDecoratorTest.php +++ b/web/core/tests/Drupal/Tests/Component/Plugin/Discovery/StaticDiscoveryDecoratorTest.php @@ -100,7 +100,12 @@ class StaticDiscoveryDecoratorTest extends TestCase { $ref_decorated->setValue($mock_decorator, $mock_decorated); if ($exception_on_invalid) { - $this->setExpectedException('Drupal\Component\Plugin\Exception\PluginNotFoundException'); + if (method_exists($this, 'expectException')) { + $this->expectException('Drupal\Component\Plugin\Exception\PluginNotFoundException'); + } + else { + $this->setExpectedException('Drupal\Component\Plugin\Exception\PluginNotFoundException'); + } } // Exercise getDefinition(). It calls parent::getDefinition().