diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2019-06-25 16:56:39 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2019-06-25 17:04:40 +0100 |
| commit | add3fa4120ca696c713a0d0ac9b9c86f751fe49a (patch) | |
| tree | 7ae5d1b083c8dc88d52add03aa2b2ae26707a20f /tests | |
| parent | d1bca350232df40efa2ae08b7de42c468a885f60 (diff) | |
| download | webtrees-add3fa4120ca696c713a0d0ac9b9c86f751fe49a.tar.gz webtrees-add3fa4120ca696c713a0d0ac9b9c86f751fe49a.tar.bz2 webtrees-add3fa4120ca696c713a0d0ac9b9c86f751fe49a.zip | |
Fix: #2447 - better detection of client_ip and request_uri
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/TestCase.php | 5 |
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); |
