mirror of
https://github.com/nextcloud/server.git
synced 2026-05-19 08:25:56 -04:00
test(unit): fix RequestTest
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
6c9f968888
commit
6490e50bb9
1 changed files with 4 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue