Skip to content

Commit

Permalink
Fix netteConnector with phpunit10 (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubvojacek authored Mar 9, 2023
1 parent b7fa4cc commit 1db5777
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Connector/NetteConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ public function setContainerAccessor(callable $containerAccessor): void
*/
public function doRequest($request): Response
{
$phpSelf = $_SERVER['PHP_SELF'];
$_COOKIE = $request->getCookies();
$_SERVER = $request->getServer();
$_FILES = $request->getFiles();

$_SERVER['PHP_SELF'] = $phpSelf;
$_SERVER['REQUEST_METHOD'] = $method = strtoupper($request->getMethod());
$_SERVER['REQUEST_URI'] = str_replace('http://localhost', '', $request->getUri());
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
Expand Down

0 comments on commit 1db5777

Please sign in to comment.