diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2024-01-26 13:11:29 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-01-29 09:59:35 +0000 |
commit | 6490e50bb9ce4e3e5525b2fc1fbf30b4893d90d0 (patch) | |
tree | c1a34468d28bedfc75fa07180eea8fc8002a09d2 /tests/lib | |
parent | 6c9f968888344cef11681a3b2ebf087f89680849 (diff) | |
download | nextcloud-server-6490e50bb9ce4e3e5525b2fc1fbf30b4893d90d0.tar.gz nextcloud-server-6490e50bb9ce4e3e5525b2fc1fbf30b4893d90d0.zip |
test(unit): fix RequestTest
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/AppFramework/Http/RequestTest.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/lib/AppFramework/Http/RequestTest.php b/tests/lib/AppFramework/Http/RequestTest.php index e042d933871..030f16f15c4 100644 --- a/tests/lib/AppFramework/Http/RequestTest.php +++ b/tests/lib/AppFramework/Http/RequestTest.php @@ -1765,14 +1765,14 @@ class RequestTest extends \Test\TestCase { public function providesGetRequestUriWithOverwriteData() { return [ ['/scriptname.php/some/PathInfo', '/owncloud/', ''], - ['/scriptname.php/some/PathInfo', '/owncloud/', '123'], + ['/scriptname.php/some/PathInfo', '/owncloud/', '123', '123.123.123.123'], ]; } /** * @dataProvider providesGetRequestUriWithOverwriteData */ - public function testGetRequestUriWithOverwrite($expectedUri, $overwriteWebRoot, $overwriteCondAddr) { + public function testGetRequestUriWithOverwrite($expectedUri, $overwriteWebRoot, $overwriteCondAddr, $remoteAddr = '') { $this->config ->expects($this->exactly(2)) ->method('getSystemValueString') @@ -1781,13 +1781,14 @@ class RequestTest extends \Test\TestCase { ['overwritecondaddr', '', $overwriteCondAddr], ]); - $request = $this->getMockBuilder('\OC\AppFramework\Http\Request') + $request = $this->getMockBuilder(Request::class) ->setMethods(['getScriptName']) ->setConstructorArgs([ [ 'server' => [ 'REQUEST_URI' => '/test.php/some/PathInfo', 'SCRIPT_NAME' => '/test.php', + 'REMOTE_ADDR' => $remoteAddr ] ], $this->requestId, |