diff --git a/apps/files_sharing/tests/API/ShareesTest.php b/apps/files_sharing/tests/API/ShareesTest.php index b74c6b0c5d1f..69710fba68b4 100644 --- a/apps/files_sharing/tests/API/ShareesTest.php +++ b/apps/files_sharing/tests/API/ShareesTest.php @@ -304,7 +304,7 @@ public function dataGetUsers() { true, ['abc', 'xyz'], [ - ['abc', 'test', 2, 0, ['test1' => 'Test One']], + ['abc', 'test', 2, 0, ['test1' => $this->getUserMock('test1', 'Test One')]], ['xyz', 'test', 2, 0, []], ], [], @@ -320,7 +320,7 @@ public function dataGetUsers() { false, ['abc', 'xyz'], [ - ['abc', 'test', 2, 0, ['test1' => 'Test One']], + ['abc', 'test', 2, 0, ['test1' => $this->getUserMock('test1', 'Test One')]], ['xyz', 'test', 2, 0, []], ], [], @@ -335,12 +335,12 @@ public function dataGetUsers() { ['abc', 'xyz'], [ ['abc', 'test', 2, 0, [ - 'test1' => 'Test One', - 'test2' => 'Test Two', + 'test1' => $this->getUserMock('test1', 'Test One'), + 'test2' => $this->getUserMock('test2', 'Test Two'), ]], ['xyz', 'test', 2, 0, [ - 'test1' => 'Test One', - 'test2' => 'Test Two', + 'test1' => $this->getUserMock('test1', 'Test One'), + 'test2' => $this->getUserMock('test2', 'Test Two'), ]], ], [], @@ -358,12 +358,12 @@ public function dataGetUsers() { ['abc', 'xyz'], [ ['abc', 'test', 2, 0, [ - 'test1' => 'Test One', - 'test2' => 'Test Two', + 'test1' => $this->getUserMock('test1', 'Test One'), + 'test2' => $this->getUserMock('test2', 'Test Two'), ]], ['xyz', 'test', 2, 0, [ - 'test1' => 'Test One', - 'test2' => 'Test Two', + 'test1' => $this->getUserMock('test1', 'Test One'), + 'test2' => $this->getUserMock('test2', 'Test Two'), ]], ], [], @@ -378,10 +378,10 @@ public function dataGetUsers() { ['abc', 'xyz'], [ ['abc', 'test', 2, 0, [ - 'test' => 'Test One', + 'test' => $this->getUserMock('test1', 'Test One'), ]], ['xyz', 'test', 2, 0, [ - 'test2' => 'Test Two', + 'test2' => $this->getUserMock('test2', 'Test Two'), ]], ], [ @@ -400,10 +400,10 @@ public function dataGetUsers() { ['abc', 'xyz'], [ ['abc', 'test', 2, 0, [ - 'test' => 'Test One', + 'test' => $this->getUserMock('test1', 'Test One'), ]], ['xyz', 'test', 2, 0, [ - 'test2' => 'Test Two', + 'test2' => $this->getUserMock('test2', 'Test Two'), ]], ], [ @@ -442,7 +442,7 @@ public function testGetUsers($searchTerm, $shareWithGroupOnly, $shareeEnumeratio if (!$shareWithGroupOnly) { $this->userManager->expects($this->once()) - ->method('searchDisplayName') + ->method('find') ->with($searchTerm, $this->invokePrivate($this->sharees, 'limit'), $this->invokePrivate($this->sharees, 'offset')) ->willReturn($userResponse); } else { @@ -462,7 +462,7 @@ public function testGetUsers($searchTerm, $shareWithGroupOnly, $shareeEnumeratio } $this->groupManager->expects($this->exactly(sizeof($groupResponse))) - ->method('displayNamesInGroup') + ->method('findUsersInGroup') ->with($this->anything(), $searchTerm, $this->invokePrivate($this->sharees, 'limit'), $this->invokePrivate($this->sharees, 'offset')) ->willReturnMap($userResponse); }