Skip to content

Commit

Permalink
remove extraneous test
Browse files Browse the repository at this point in the history
  • Loading branch information
l0gicgate committed Aug 11, 2019
1 parent fab65b4 commit 2f1b239
Showing 1 changed file with 0 additions and 50 deletions.
50 changes: 0 additions & 50 deletions tests/Factory/AppFactoryTest.php
Expand Up @@ -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());
}
}

0 comments on commit 2f1b239

Please sign in to comment.