diff --git a/core/modules/system/tests/modules/error_service_test/src/ErrorServiceTestServiceProvider.php b/core/modules/system/tests/modules/error_service_test/src/ErrorServiceTestServiceProvider.php new file mode 100644 index 000000000000..4a4aaafcb454 --- /dev/null +++ b/core/modules/system/tests/modules/error_service_test/src/ErrorServiceTestServiceProvider.php @@ -0,0 +1,28 @@ +rebuildContainer(); // 2) Fetch the in-situ container builder. - $container = $kernel->getContainer(); + $container = ErrorServiceTestServiceProvider::$containerBuilder; + // Ensure the compiler pass worked. + if (!$container) { + throw new \Exception('Oh oh, monkeys stole the ServiceProvider.'); + } // Stop the theme manager from being found - and triggering error // maintenance mode. $container->removeDefinition('theme.manager');