X Tutup
Skip to content

Commit 1b953e1

Browse files
author
JanAckermann
committed
Fix unit tests
1 parent 8f19d4d commit 1b953e1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/Settings/Controller/UsersControllerTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1960,7 +1960,7 @@ public function testSetEmailAddressSendEmail($id, $mailaddress) {
19601960

19611961
$iUser = $this->createMock(IUser::class);
19621962
$iUser->expects($this->once())
1963-
->method('canChangeDisplayName')
1963+
->method('canChangeMailAddress')
19641964
->willReturn(true);
19651965
$userManager->method('get')->willReturn($iUser);
19661966
$iUser->method('getUID')->willReturn($id);
@@ -2011,10 +2011,10 @@ public function setEmailAddressData() {
20112011
* @param string $mailAddress
20122012
* @param bool $isValid
20132013
* @param bool $expectsUpdate
2014-
* @param bool $canChangeDisplayName
2014+
* @param bool $chanChangeMailAddress
20152015
* @param bool $responseCode
20162016
*/
2017-
public function testSetEmailAddress($mailAddress, $isValid, $expectsUpdate, $canChangeDisplayName, $responseCode) {
2017+
public function testSetEmailAddress($mailAddress, $isValid, $expectsUpdate, $chanChangeMailAddress, $responseCode) {
20182018
$this->container['IsAdmin'] = true;
20192019

20202020
$user = $this->getMockBuilder('\OC\User\User')
@@ -2029,8 +2029,8 @@ public function testSetEmailAddress($mailAddress, $isValid, $expectsUpdate, $can
20292029
->will($this->returnValue('foo@local'));
20302030
$user
20312031
->expects($this->any())
2032-
->method('canChangeDisplayName')
2033-
->will($this->returnValue($canChangeDisplayName));
2032+
->method('canChangeMailAddress')
2033+
->will($this->returnValue($chanChangeMailAddress));
20342034
$user
20352035
->expects($this->any())
20362036
->method('setEMailAddress')
@@ -2050,7 +2050,7 @@ public function testSetEmailAddress($mailAddress, $isValid, $expectsUpdate, $can
20502050

20512051
if ($isValid) {
20522052
$user->expects($this->atLeastOnce())
2053-
->method('canChangeDisplayName')
2053+
->method('canChangeMailAddress')
20542054
->willReturn(true);
20552055
}
20562056

0 commit comments

Comments
 (0)
X Tutup