aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2024-01-26 13:11:29 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-01-29 09:58:56 +0000
commitd7b8f586d486860ccde9efc38ed81b7bec2ec4b4 (patch)
tree97742838371f3c167f5f5ce7c58c2a781e996e81
parent8442ed014d10fa20f6cf7bc2070bd56fe1f2e60e (diff)
downloadnextcloud-server-d7b8f586d486860ccde9efc38ed81b7bec2ec4b4.tar.gz
nextcloud-server-d7b8f586d486860ccde9efc38ed81b7bec2ec4b4.zip
test(unit): fix RequestTest
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
-rw-r--r--tests/lib/AppFramework/Http/RequestTest.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/lib/AppFramework/Http/RequestTest.php b/tests/lib/AppFramework/Http/RequestTest.php
index 4f53b3d8d5c..25b3a88f300 100644
--- a/tests/lib/AppFramework/Http/RequestTest.php
+++ b/tests/lib/AppFramework/Http/RequestTest.php
@@ -1822,14 +1822,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')
@@ -1838,13 +1838,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,