/** * @return SymfonyIntegration */ private function getIntegration() { $container = new Container(); $container->setParameter('plehatron_limoncello', []); $integration = new SymfonyIntegration(); $integration->setContainer($container); return $integration; }
private function getIntegration() { $container = Mockery::mock(ContainerInterface::class); $container->shouldReceive('getParameter')->withArgs(['plehatron_limoncello'])->andReturn([]); $container->shouldReceive('get')->withArgs(['request_stack'])->andReturn(Mockery::mock(RequestStack::class)->shouldReceive('getCurrentRequest')->andReturn(null)->getMock()); $container->shouldReceive('set')->withAnyArgs(); $container->shouldReceive('has')->withArgs(['yep'])->andReturn(true); $container->shouldReceive('has')->withArgs(['nope'])->andReturn(false); $integration = new SymfonyIntegration(); $integration->setContainer($container); return $integration; }