.../Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php index ed013b5..5fe2b44 100644 --- a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php +++ b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php @@ -63,12 +63,11 @@ public function testProcessRequiredHandlers() { /** * Tests a required consumer with no handlers. * - * @expectedException \Symfony\Component\DependencyInjection\Exception\LogicException - * @expectedExceptionMessage At least one service tagged with 'consumer_id' is required. * @covers ::process * @covers ::processServiceIdCollectorPass */ public function testIdCollectorProcessRequiredHandlers() { + $this->setExpectedException(LogicException::class, "At least one service tagged with 'consumer_id' is required."); $container = $this->buildContainer(); $container ->register('consumer_id', __NAMESPACE__ . '\ValidConsumer')