|
|
|
|
@ -2546,7 +2546,7 @@ class UsersControllerTest extends \Test\TestCase { |
|
|
|
|
->method('getUID') |
|
|
|
|
->will($this->returnValue('def')); |
|
|
|
|
$this->userSession |
|
|
|
|
->expects($this->exactly(2)) |
|
|
|
|
->expects($this->exactly(1)) |
|
|
|
|
->method('getUser') |
|
|
|
|
->will($this->returnValue($user)); |
|
|
|
|
$this->userManager |
|
|
|
|
@ -2555,14 +2555,9 @@ class UsersControllerTest extends \Test\TestCase { |
|
|
|
|
->with('abc') |
|
|
|
|
->willReturn(null); |
|
|
|
|
|
|
|
|
|
$subadmin = $this->createMock('\OC\SubAdmin'); |
|
|
|
|
$subadmin->expects($this->once()) |
|
|
|
|
->method('isUserAccessible') |
|
|
|
|
->will($this->returnValue(true)); |
|
|
|
|
$this->groupManager |
|
|
|
|
->expects($this->once()) |
|
|
|
|
->method('getSubAdmin') |
|
|
|
|
->willReturn($subadmin); |
|
|
|
|
->expects($this->never()) |
|
|
|
|
->method('getSubAdmin'); |
|
|
|
|
|
|
|
|
|
$expectedResponse = new DataResponse( |
|
|
|
|
[ |
|
|
|
|
@ -2762,7 +2757,7 @@ class UsersControllerTest extends \Test\TestCase { |
|
|
|
|
->method('getUID') |
|
|
|
|
->will($this->returnValue('def')); |
|
|
|
|
$this->userSession |
|
|
|
|
->expects($this->exactly(2)) |
|
|
|
|
->expects($this->exactly(1)) |
|
|
|
|
->method('getUser') |
|
|
|
|
->will($this->returnValue($user)); |
|
|
|
|
$this->userManager |
|
|
|
|
@ -2771,14 +2766,9 @@ class UsersControllerTest extends \Test\TestCase { |
|
|
|
|
->with('abc') |
|
|
|
|
->willReturn(null); |
|
|
|
|
|
|
|
|
|
$subadmin = $this->createMock('\OC\SubAdmin'); |
|
|
|
|
$subadmin->expects($this->once()) |
|
|
|
|
->method('isUserAccessible') |
|
|
|
|
->will($this->returnValue(true)); |
|
|
|
|
$this->groupManager |
|
|
|
|
->expects($this->once()) |
|
|
|
|
->method('getSubAdmin') |
|
|
|
|
->willReturn($subadmin); |
|
|
|
|
->expects($this->never()) |
|
|
|
|
->method('getSubAdmin'); |
|
|
|
|
|
|
|
|
|
$expectedResponse = new DataResponse( |
|
|
|
|
[ |
|
|
|
|
|