From f7ae9dbc5b09611a5cb4d56cf6afb20b47be2065 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sun, 3 Mar 2019 19:10:02 +0700 Subject: [PATCH] use ArrayObject check for Aura container instead of PHPDI --- spec/Middleware/ExpressiveFactorySpec.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spec/Middleware/ExpressiveFactorySpec.php b/spec/Middleware/ExpressiveFactorySpec.php index 71a8c0a7..13fccac9 100644 --- a/spec/Middleware/ExpressiveFactorySpec.php +++ b/spec/Middleware/ExpressiveFactorySpec.php @@ -218,12 +218,12 @@ $config = []; foreach ($this->mapCreateContainers as $containerClass => $container) { - if ($container instanceof PHPDIContainer) { + if ($container instanceof AuraContainer) { $config = new ArrayObject($config); } allow($container)->toReceive('get')->with('config') ->andReturn($config); - if ($container instanceof PHPDIContainer) { + if ($container instanceof AuraContainer) { $config = $config->getArrayCopy(); } allow($container)->toReceive('has')->with(EntityManager::class)->andReturn(false); @@ -256,12 +256,12 @@ foreach ($this->mapCreateContainers as $container) { $config['log']['ErrorHeroModuleLogger']['writers'][0]['options']['db'] = Adapter::class; - if ($container instanceof PHPDIContainer) { + if ($container instanceof AuraContainer) { $config = new ArrayObject($config); } allow($container)->toReceive('get')->with('config') ->andReturn($config); - if ($container instanceof PHPDIContainer) { + if ($container instanceof AuraContainer) { $config = $config->getArrayCopy(); } allow($container)->toReceive('has')->with(EntityManager::class)->andReturn(false); @@ -287,12 +287,12 @@ foreach ($this->mapCreateContainers as $container) { $config = $this->config; $config['log']['ErrorHeroModuleLogger']['writers'][0]['options']['db'] = 'my-adapter'; - if ($container instanceof PHPDIContainer) { + if ($container instanceof AuraContainer) { $config = new ArrayObject($config); } allow($container)->toReceive('get')->with('config') ->andReturn($config); - if ($container instanceof PHPDIContainer) { + if ($container instanceof AuraContainer) { $config = $config->getArrayCopy(); } allow($container)->toReceive('has')->with(EntityManager::class)->andReturn(false); @@ -317,12 +317,12 @@ $config = $this->config; foreach ($this->mapCreateContainers as $container) { - if ($container instanceof PHPDIContainer) { + if ($container instanceof AuraContainer) { $config = new ArrayObject($config); } allow($container)->toReceive('get')->with('config') ->andReturn($config); - if ($container instanceof PHPDIContainer) { + if ($container instanceof AuraContainer) { $config = $config->getArrayCopy(); } allow($container)->toReceive('has')->with(EntityManager::class)->andReturn(false);