adjust tests to have at least one disabled user

This commit is contained in:
Morris Jobke 2016-09-14 14:30:55 +02:00
parent 7be031ae6d
commit 79d74a1425
No known key found for this signature in database
GPG key ID: 9CE5ED29E7FCD38A

View file

@ -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);