Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-09-14 15:30:55 +0300
committerMorris Jobke <hey@morrisjobke.de>2017-04-29 06:54:30 +0300
commit79d74a1425e6765a30469422a9b9ff218c8e2ef2 (patch)
treeaef95364d3e567c052abefc3317e8655ed2ca129 /tests/Settings
parent7be031ae6de807862d7d9e3632c79f8b80cf73c9 (diff)
adjust tests to have at least one disabled user
Diffstat (limited to 'tests/Settings')
-rw-r--r--tests/Settings/Controller/UsersControllerTest.php15
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);