Skip to content

Commit

Permalink
Merge pull request #2811 from adriansuter/patch-remove-deferred-callable
Browse files Browse the repository at this point in the history
4.x - Remove `DeferredCallable`
  • Loading branch information
l0gicgate committed Aug 18, 2019
2 parents 8ab3432 + c638bef commit a139440
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 121 deletions.
46 changes: 0 additions & 46 deletions Slim/DeferredCallable.php

This file was deleted.

71 changes: 0 additions & 71 deletions tests/DeferredCallableTest.php

This file was deleted.

6 changes: 2 additions & 4 deletions tests/Routing/RouteTest.php
Expand Up @@ -17,10 +17,8 @@
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\StreamInterface;
use Psr\Http\Message\UriInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Slim\CallableResolver;
use Slim\DeferredCallable;
use Slim\Handlers\Strategies\RequestHandler;
use Slim\Handlers\Strategies\RequestResponse;
use Slim\Interfaces\CallableResolverInterface;
Expand Down Expand Up @@ -390,7 +388,7 @@ public function testControllerMethodAsStringResolvesWithoutContainer()
$callableResolver = new CallableResolver();
$responseFactory = $this->getResponseFactory();

$deferred = new DeferredCallable('\Slim\Tests\Mocks\CallableTest:toCall', $callableResolver);
$deferred = $callableResolver->resolve('\Slim\Tests\Mocks\CallableTest:toCall');
$route = new Route(['GET'], '/', $deferred, $responseFactory, $callableResolver);

CallableTest::$CalledCount = 0;
Expand All @@ -410,7 +408,6 @@ public function testControllerMethodAsStringResolvesWithContainer()
$callableResolverProphecy = $this->prophesize(CallableResolverInterface::class);

$callable = 'CallableTest:toCall';
$deferred = new DeferredCallable($callable, $callableResolverProphecy->reveal());

$callableResolverProphecy
->resolve($callable)
Expand All @@ -426,6 +423,7 @@ public function testControllerMethodAsStringResolvesWithContainer()
})
->shouldBeCalledOnce();

$deferred = $callableResolverProphecy->reveal()->resolve($callable);
$callableResolverProphecy
->resolve($deferred)
->willReturn($deferred)
Expand Down

0 comments on commit a139440

Please sign in to comment.