diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-01-05 15:51:16 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-01-05 20:13:11 +0100 |
commit | 1672ff3bef9c44e5626c602e62090c18784a7b61 (patch) | |
tree | b5f41faecaf584f749ecaccbb0a63460eafb2e94 /apps/files_sharing/tests/Controller | |
parent | d7fdab0c0186254b1fdce4b52e13f2fb8867d3fe (diff) | |
download | nextcloud-server-1672ff3bef9c44e5626c602e62090c18784a7b61.tar.gz nextcloud-server-1672ff3bef9c44e5626c602e62090c18784a7b61.zip |
Do not use $_GET
The appframework is more than capable of handling this properly.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing/tests/Controller')
-rw-r--r-- | apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php index 8c0c5b1e41c..1fb14ad9b8f 100644 --- a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php @@ -271,9 +271,12 @@ class ShareesAPIControllerTest extends TestCase { ->setMethods(['isRemoteSharingAllowed', 'shareProviderExists', 'isRemoteGroupSharingAllowed']) ->getMock(); + $expectedShareTypes = $shareTypes; + sort($expectedShareTypes); + $this->collaboratorSearch->expects($this->once()) ->method('search') - ->with($search, $shareTypes, $this->anything(), $perPage, $perPage * ($page -1)) + ->with($search, $expectedShareTypes, $this->anything(), $perPage, $perPage * ($page -1)) ->willReturn([[], false]); $sharees->expects($this->any()) @@ -398,7 +401,7 @@ class ShareesAPIControllerTest extends TestCase { $this->assertSame($expected, $this->invokePrivate($this->sharees, 'isRemoteSharingAllowed', [$itemType])); } - + public function testSearchNoItemType() { $this->expectException(\OCP\AppFramework\OCS\OCSBadRequestException::class); $this->expectExceptionMessage('Missing itemType'); |