fix unit tests

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2016-12-02 00:23:33 +01:00
parent 485d6d6577
commit 4c37c38051
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
1 changed files with 6 additions and 16 deletions

View File

@ -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(
[