public function notDefinedRegistryWillBeIgnoredByBeanFactoryPostProcessor() { $processor = new BeanFactoryPostProcessor(); $service = new BeanFactoryAwareService(); // un-setting the BeanFactory instance stored in the BeanFactoryRegistry $reflection = new ReflectionProperty(BeanFactoryRegistry::class, 'beanFactory'); $reflection->setAccessible(true); $reflection->setValue(null); $processor->postProcess($service, 'BeanFactoryAwareService'); self::assertNull($service->getBeanFactory()); }