Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/issue-11974' into issue-11974
Browse files Browse the repository at this point in the history
  • Loading branch information
iliepandia committed Apr 22, 2018
2 parents ae0104d + f10a9fe commit a0eb569
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Error/ExceptionRenderer.php
Expand Up @@ -126,7 +126,7 @@ protected function _unwrap($exception)
protected function _getController()
{
$request = $this->request;
if(!$request) {
if (!$request) {
if (!$request = Router::getRequest(true)) {
$request = ServerRequestFactory::fromGlobals();
}
Expand Down
5 changes: 2 additions & 3 deletions src/TestSuite/IntegrationTestCase.php
Expand Up @@ -485,10 +485,10 @@ protected function _sendRequest($url, $method, $data = [])
$dispatcher = $this->_makeDispatcher();
try {
$request = $this->_buildRequest($url, $method, $data);
if($dispatcher instanceof LegacyRequestDispatcher ){
if ($dispatcher instanceof LegacyRequestDispatcher) {
//The legacy dispatcher expects an array...
$response = $dispatcher->execute($request);
}elseif($dispatcher instanceof MiddlewareDispatcher ){
} elseif ($dispatcher instanceof MiddlewareDispatcher) {
$psrRequest = $this->_createRequest($request);
$response = $dispatcher->execute($psrRequest);
}
Expand Down Expand Up @@ -538,7 +538,6 @@ protected function _createRequest($spec)
return $request;
}


/**
* Get the correct dispatcher instance.
*
Expand Down
2 changes: 1 addition & 1 deletion src/TestSuite/MiddlewareDispatcher.php
Expand Up @@ -91,7 +91,7 @@ public function execute($request)
);

$server = new Server($app);

return $server->run($request);
}

}
2 changes: 1 addition & 1 deletion tests/test_app/TestApp/Error/TestAppsExceptionRenderer.php
Expand Up @@ -19,7 +19,7 @@ class TestAppsExceptionRenderer extends ExceptionRenderer
protected function _getController()
{
$request = $this->request;
if(!$request) {
if (!$request) {
if (!$request = Router::getRequest(true)) {
$request = new ServerRequest();
}
Expand Down

0 comments on commit a0eb569

Please sign in to comment.