summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/TestCase.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/TestCase.php b/tests/TestCase.php
index 22d471bfd1..c20868d2b1 100644
--- a/tests/TestCase.php
+++ b/tests/TestCase.php
@@ -84,8 +84,6 @@ class TestCase extends \PHPUnit\Framework\TestCase implements StatusCodeInterfac
app()->instance(UserService::class, new UserService());
app()->instance(UserInterface::class, new GuestUser());
-
- app()->instance(ServerRequestInterface::class, new ServerRequest('GET', 'http://localhost/index.php'));
app()->instance(Filesystem::class, new Filesystem(new MemoryAdapter()));
app()->bind(ModuleThemeInterface::class, WebtreesTheme::class);
@@ -220,7 +218,8 @@ class TestCase extends \PHPUnit\Framework\TestCase implements StatusCodeInterfac
->createServerRequest($method, $uri)
->withQueryParams($query)
->withParsedBody($params)
- ->withUploadedFiles($files);
+ ->withUploadedFiles($files)
+ ->withAttribute('client_ip', '127.0.0.1');
app()->instance(ServerRequestInterface::class, $request);