->method('getUID')
->will($this->returnValue('def'));
$this->userSession
- ->expects($this->exactly(2))
+ ->expects($this->exactly(1))
->method('getUser')
->will($this->returnValue($user));
$this->userManager
->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(
[
->method('getUID')
->will($this->returnValue('def'));
$this->userSession
- ->expects($this->exactly(2))
+ ->expects($this->exactly(1))
->method('getUser')
->will($this->returnValue($user));
$this->userManager
->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(
[