diff --git a/tests/Factory/AppFactoryTest.php b/tests/Factory/AppFactoryTest.php index d3d13cfab..d490ff720 100644 --- a/tests/Factory/AppFactoryTest.php +++ b/tests/Factory/AppFactoryTest.php @@ -293,54 +293,4 @@ public function testCreateAppWithContainerUsesContainerDependenciesWhenPresent() $this->assertSame($app->getRouteCollector(), $routeCollectorProphecy->reveal()); $this->assertSame($app->getRouteResolver(), $routeResolverProphecy->reveal()); } - - public function testCreateAppWithContainerFallsBackOntoInternalLogic() - { - $responseFactoryProphecy = $this->prophesize(ResponseFactoryInterface::class); - $callableResolverProphecy = $this->prophesize(CallableResolverInterface::class); - $routeResolverProphecy = $this->prophesize(RouteResolverInterface::class); - $routeParserProphecy = $this->prophesize(RouteParserInterface::class); - - $routeCollectorProphecy = $this->prophesize(RouteCollectorInterface::class); - $routeCollectorProphecy - ->getRouteParser() - ->willReturn($routeParserProphecy->reveal()) - ->shouldBeCalledOnce(); - - $containerProphecy = $this->prophesize(ContainerInterface::class); - - $containerProphecy - ->has(ResponseFactoryInterface::class) - ->willReturn(false) - ->shouldBeCalledOnce(); - - $containerProphecy - ->has(CallableResolverInterface::class) - ->willReturn(false) - ->shouldBeCalledOnce(); - - $containerProphecy - ->has(RouteCollectorInterface::class) - ->willReturn(false) - ->shouldBeCalledOnce(); - - $containerProphecy - ->has(RouteResolverInterface::class) - ->willReturn(false) - ->shouldBeCalledOnce(); - - AppFactory::setSlimHttpDecoratorsAutomaticDetection(false); - AppFactory::setResponseFactory($responseFactoryProphecy->reveal()); - AppFactory::setCallableResolver($callableResolverProphecy->reveal()); - AppFactory::setRouteCollector($routeCollectorProphecy->reveal()); - AppFactory::setRouteResolver($routeResolverProphecy->reveal()); - - $app = AppFactory::createFromContainer($containerProphecy->reveal()); - - $this->assertSame($app->getResponseFactory(), $responseFactoryProphecy->reveal()); - $this->assertSame($app->getContainer(), $containerProphecy->reveal()); - $this->assertSame($app->getCallableResolver(), $callableResolverProphecy->reveal()); - $this->assertSame($app->getRouteCollector(), $routeCollectorProphecy->reveal()); - $this->assertSame($app->getRouteResolver(), $routeResolverProphecy->reveal()); - } }