diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-12-02 00:23:33 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-04-29 00:59:09 -0300 |
commit | 4c37c380511bfb5cd06c247cef543e2c5ce3119a (patch) | |
tree | e9eed96d8aa4fdc3bb041de333092d3898199ead /tests/Settings/Controller/UsersControllerTest.php | |
parent | 485d6d657761370dc200d9cdb023ad564c23c4e9 (diff) | |
download | nextcloud-server-4c37c380511bfb5cd06c247cef543e2c5ce3119a.tar.gz nextcloud-server-4c37c380511bfb5cd06c247cef543e2c5ce3119a.zip |
fix unit tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'tests/Settings/Controller/UsersControllerTest.php')
-rw-r--r-- | tests/Settings/Controller/UsersControllerTest.php | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/tests/Settings/Controller/UsersControllerTest.php b/tests/Settings/Controller/UsersControllerTest.php index 1dd3b0c6979..24019800490 100644 --- a/tests/Settings/Controller/UsersControllerTest.php +++ b/tests/Settings/Controller/UsersControllerTest.php @@ -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( [ |