From 241c3ec9a3db16e5cc918b2eba312bf963d81797 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Wed, 6 Jun 2018 22:31:19 +0700 Subject: [PATCH] test expect ErrorHeroModuleLogger created during factory invoke for usage of Doctrine\ORM\EntityManager service with servicemanager container --- spec/Middleware/ExpressiveFactorySpec.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/Middleware/ExpressiveFactorySpec.php b/spec/Middleware/ExpressiveFactorySpec.php index 35888bbe..eb53c269 100644 --- a/spec/Middleware/ExpressiveFactorySpec.php +++ b/spec/Middleware/ExpressiveFactorySpec.php @@ -175,8 +175,11 @@ 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(); + });