From 3801bd32669b1af20c62f2fcf59fe8445fd2f5f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20B=C3=B6hringer?= Date: Tue, 9 Jul 2024 11:33:14 +0200 Subject: [PATCH] fix unit tests due to the laminas/servicemanager upgrade MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Böhringer --- .../Adapter/AdapterAbstractServiceFactoryTest.php | 13 +++++++------ test/unit/Adapter/AdapterServiceDelegatorTest.php | 3 ++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/test/unit/Adapter/AdapterAbstractServiceFactoryTest.php b/test/unit/Adapter/AdapterAbstractServiceFactoryTest.php index f9051630..d7ad9a66 100644 --- a/test/unit/Adapter/AdapterAbstractServiceFactoryTest.php +++ b/test/unit/Adapter/AdapterAbstractServiceFactoryTest.php @@ -1,10 +1,11 @@ serviceManager = new ServiceManager(); - - $config = new Config([ - 'abstract_factories' => [AdapterAbstractServiceFactory::class], - ]); - $config->configureServiceManager($this->serviceManager); + $this->serviceManager->configure( + [ + 'abstract_factories' => [AdapterAbstractServiceFactory::class], + ] + ); $this->serviceManager->setService('config', [ 'db' => [ diff --git a/test/unit/Adapter/AdapterServiceDelegatorTest.php b/test/unit/Adapter/AdapterServiceDelegatorTest.php index b1217ece..f151067e 100644 --- a/test/unit/Adapter/AdapterServiceDelegatorTest.php +++ b/test/unit/Adapter/AdapterServiceDelegatorTest.php @@ -211,6 +211,7 @@ public function testDelegatorWithPluginManager() /** @var AbstractSingleInstancePluginManager $pluginManager */ $pluginManager = new class ($container, $pluginManagerConfig) extends AbstractSingleInstancePluginManager { + protected string $instanceOf = ConcreteAdapterAwareObject::class; }; $options = [ @@ -219,7 +220,7 @@ public function testDelegatorWithPluginManager() ]; /** @var ConcreteAdapterAwareObject $result */ - $result = $pluginManager->get( + $result = $pluginManager->build( ConcreteAdapterAwareObject::class, $options );