From a024af557745bd59700bda2e316cb3f3e78ea40a Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Wed, 6 Jun 2018 22:26:50 +0700 Subject: [PATCH] test expect ErrorHeroModuleLogger created during factory invoke for non-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 082b89ab..bb3b155b 100644 --- a/spec/Middleware/ExpressiveFactorySpec.php +++ b/spec/Middleware/ExpressiveFactorySpec.php @@ -248,8 +248,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(); + } });