From e72f031d6bc13a46dea85f27d718c36e3ee3a806 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Wed, 6 Jun 2018 22:27:58 +0700 Subject: [PATCH] test expect ErrorHeroModuleLogger created during factory invoke for non-servicemanager container --- spec/Middleware/ExpressiveFactorySpec.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/Middleware/ExpressiveFactorySpec.php b/spec/Middleware/ExpressiveFactorySpec.php index bb3b155b..35888bbe 100644 --- a/spec/Middleware/ExpressiveFactorySpec.php +++ b/spec/Middleware/ExpressiveFactorySpec.php @@ -252,7 +252,6 @@ $actual = $this->factory($container); expect($actual)->toBeAnInstanceOf(Expressive::class); expect($container->has('ErrorHeroModuleLogger'))->toBeTruthy(); - } }); @@ -274,8 +273,10 @@ allow($container)->toReceive('get')->with(TemplateRendererInterface::class) ->andReturn($renderer); + expect($container->has('ErrorHeroModuleLogger'))->toBeFalsy(); $actual = $this->factory($container); expect($actual)->toBeAnInstanceOf(Expressive::class); + expect($container->has('ErrorHeroModuleLogger'))->toBeTruthy(); } });