summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-02-03 12:16:56 +0100
committerGitHub <noreply@github.com>2024-02-03 12:16:56 +0100
commit933ad5e4d2c18a4f083ce46752b740f4c9a9511e (patch)
tree320fc8919decf7a8911a15ee95af97d143d65aad /tests
parente0f96bc1ac0641a79f2da237addca1cf35041f9e (diff)
parentd7b8f586d486860ccde9efc38ed81b7bec2ec4b4 (diff)
downloadnextcloud-server-933ad5e4d2c18a4f083ce46752b740f4c9a9511e.tar.gz
nextcloud-server-933ad5e4d2c18a4f083ce46752b740f4c9a9511e.zip
Merge pull request #43181 from nextcloud/backport/42930/stable28
[stable28] Fix: config param 'overwritecondaddr' not working
Diffstat (limited to 'tests')
-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,