|
|
|
@ -136,12 +136,20 @@ class ShareesTest extends TestCase { |
|
|
|
], |
|
|
|
[ |
|
|
|
'test', true, true, [], [], |
|
|
|
[], [], true, $this->getUserMock('test', 'Test') |
|
|
|
], |
|
|
|
[ |
|
|
|
'test', true, false, [], [], |
|
|
|
[], [], true, $this->getUserMock('test', 'Test') |
|
|
|
], |
|
|
|
[ |
|
|
|
'test', true, true, ['test-group'], [['test-group', 'test', 2, 0, []]], |
|
|
|
[ |
|
|
|
['label' => 'Test', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test']], |
|
|
|
], [], true, $this->getUserMock('test', 'Test') |
|
|
|
], |
|
|
|
[ |
|
|
|
'test', true, false, [], [], |
|
|
|
'test', true, false, ['test-group'], [['test-group', 'test', 2, 0, []]], |
|
|
|
[ |
|
|
|
['label' => 'Test', 'value' => ['shareType' => Share::SHARE_TYPE_USER, 'shareWith' => 'test']], |
|
|
|
], [], true, $this->getUserMock('test', 'Test') |
|
|
|
@ -390,10 +398,20 @@ class ShareesTest extends TestCase { |
|
|
|
->with($searchTerm, $this->invokePrivate($this->sharees, 'limit'), $this->invokePrivate($this->sharees, 'offset')) |
|
|
|
->willReturn($userResponse); |
|
|
|
} else { |
|
|
|
$this->groupManager->expects($this->once()) |
|
|
|
->method('getUserGroupIds') |
|
|
|
->with($user) |
|
|
|
->willReturn($groupResponse); |
|
|
|
if ($singleUser !== false) { |
|
|
|
$this->groupManager->expects($this->exactly(2)) |
|
|
|
->method('getUserGroupIds') |
|
|
|
->withConsecutive( |
|
|
|
$user, |
|
|
|
$singleUser |
|
|
|
) |
|
|
|
->willReturn($groupResponse); |
|
|
|
} else { |
|
|
|
$this->groupManager->expects($this->once()) |
|
|
|
->method('getUserGroupIds') |
|
|
|
->with($user) |
|
|
|
->willReturn($groupResponse); |
|
|
|
} |
|
|
|
|
|
|
|
$this->groupManager->expects($this->exactly(sizeof($groupResponse))) |
|
|
|
->method('displayNamesInGroup') |
|
|
|
|