diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-09-14 14:30:55 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-04-29 00:54:30 -0300 |
commit | 79d74a1425e6765a30469422a9b9ff218c8e2ef2 (patch) | |
tree | aef95364d3e567c052abefc3317e8655ed2ca129 /tests | |
parent | 7be031ae6de807862d7d9e3632c79f8b80cf73c9 (diff) | |
download | nextcloud-server-79d74a1425e6765a30469422a9b9ff218c8e2ef2.tar.gz nextcloud-server-79d74a1425e6765a30469422a9b9ff218c8e2ef2.zip |
adjust tests to have at least one disabled user
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Settings/Controller/UsersControllerTest.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/Settings/Controller/UsersControllerTest.php b/tests/Settings/Controller/UsersControllerTest.php index 2491d721900..14f43a9e8e3 100644 --- a/tests/Settings/Controller/UsersControllerTest.php +++ b/tests/Settings/Controller/UsersControllerTest.php @@ -273,9 +273,15 @@ class UsersControllerTest extends \Test\TestCase { ->expects($this->once()) ->method('getBackendClassName') ->willReturn(Dummy::class); - $bar->expects($this->any()) + $bar->expects($this->at(0)) + ->method('isEnabled') + ->willReturn(true); + $bar->expects($this->at(1)) ->method('isEnabled') ->willReturn(true); + $bar->expects($this->at(2)) + ->method('isEnabled') + ->willReturn(false); $this->groupManager ->expects($this->once()) @@ -367,7 +373,7 @@ class UsersControllerTest extends \Test\TestCase { 'email' => 'bar@dummy.com', 'isRestoreDisabled' => false, 'isAvatarAvailable' => true, - 'isEnabled' => true, + 'isEnabled' => false, ), ) ); @@ -2217,6 +2223,11 @@ class UsersControllerTest extends \Test\TestCase { /** * @dataProvider setEmailAddressData * + * @param string $mailAddress + * @param bool $isValid + * @param bool $expectsUpdate + * @param bool $canChangeDisplayName + * @param int $responseCode */ public function testSetEMailAddress($mailAddress, $isValid, $expectsUpdate, $canChangeDisplayName, $responseCode) { $user = $this->createMock(User::class); |