diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-07-03 11:31:25 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-07-03 21:34:18 +0200 |
commit | 857fae288caffe25ecb9d691dfbea74f4b041339 (patch) | |
tree | 046ab1842feff254c02a5f498d03eb510dfcf778 /tests/lib | |
parent | c5c14d09b190d3e8e1fe5e8e6aff7e95b0ac6f20 (diff) | |
download | nextcloud-server-857fae288caffe25ecb9d691dfbea74f4b041339.tar.gz nextcloud-server-857fae288caffe25ecb9d691dfbea74f4b041339.zip |
Always set the display name for user shares
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/Share20/DefaultShareProviderTest.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/lib/Share20/DefaultShareProviderTest.php b/tests/lib/Share20/DefaultShareProviderTest.php index 578225840b6..f5f710cbbd3 100644 --- a/tests/lib/Share20/DefaultShareProviderTest.php +++ b/tests/lib/Share20/DefaultShareProviderTest.php @@ -1110,8 +1110,10 @@ class DefaultShareProviderTest extends \Test\TestCase { $user0 = $this->createMock(IUser::class); $user0->method('getUID')->willReturn('user0'); + $user0->method('getDisplayName')->willReturn('user0'); $user1 = $this->createMock(IUser::class); $user1->method('getUID')->willReturn('user1'); + $user0->method('getDisplayName')->willReturn('user0'); $this->userManager->method('get')->willReturnMap([ ['user0', $user0], @@ -1640,8 +1642,10 @@ class DefaultShareProviderTest extends \Test\TestCase { $user1 = $this->createMock(IUser::class); $user1->method('getUID')->willReturn('user1'); + $user1->method('getDisplayName')->willReturn('user1'); $user2 = $this->createMock(IUser::class); $user2->method('getUID')->willReturn('user2'); + $user2->method('getDisplayName')->willReturn('user2'); $this->userManager->method('get')->will($this->returnValueMap([ ['user1', $user1], ['user2', $user2], @@ -1691,8 +1695,10 @@ class DefaultShareProviderTest extends \Test\TestCase { $user1 = $this->createMock(IUser::class); $user1->method('getUID')->willReturn('user1'); + $user1->method('getDisplayName')->willReturn('user1'); $user2 = $this->createMock(IUser::class); $user2->method('getUID')->willReturn('user2'); + $user2->method('getDisplayName')->willReturn('user2'); $user3 = $this->createMock(IUser::class); $this->userManager->method('get')->will($this->returnValueMap([ ['user1', $user1], @@ -1755,6 +1761,7 @@ class DefaultShareProviderTest extends \Test\TestCase { for($i = 0; $i < 6; $i++) { $user = $this->createMock(IUser::class); $user->method('getUID')->willReturn('user'.$i); + $user->method('getDisplayName')->willReturn('user' . $i); $users['user'.$i] = $user; } @@ -2105,8 +2112,10 @@ class DefaultShareProviderTest extends \Test\TestCase { $user0 = $this->createMock(IUser::class); $user0->method('getUID')->willReturn('user0'); + $user0->method('getDisplayName')->willReturn('user0'); $user1 = $this->createMock(IUser::class); $user1->method('getUID')->willReturn('user1'); + $user1->method('getDisplayName')->willReturn('user1'); $this->userManager->method('get')->will($this->returnValueMap([ ['user0', $user0], |