Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronak Patel committed Oct 6, 2023
1 parent 469934e commit 960b04e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4173,10 +4173,11 @@ public function dataGetEditableFields() {
* @dataProvider dataGetEditableFields
*
* @param bool $allowedToChangeDisplayName
* @param bool $allowedToChangeEmailAddress
* @param string $userBackend
* @param array $expected
*/
public function testGetEditableFields(bool $allowedToChangeDisplayName, string $userBackend, array $expected) {
public function testGetEditableFields(bool $allowedToChangeDisplayName,bool $allowedToChangeEmailAddress, string $userBackend, array $expected) {
$this->config
->method('getSystemValue')
->with(
Expand All @@ -4188,7 +4189,7 @@ public function testGetEditableFields(bool $allowedToChangeDisplayName, string $
->with(
$this->equalTo('allow_user_to_change_email_address'),
$this->anything()
)->willReturn($allowedToChangeDisplayName);
)->willReturn($allowedToChangeEmailAddress);

$user = $this->createMock(IUser::class);
$this->userSession->method('getUser')
Expand Down
2 changes: 1 addition & 1 deletion lib/public/IUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function canChangeDisplayName();
* check if the backend supports changing email addresses
*
* @return bool
* @since 8.0.0
* @since 28.0.0
*/
public function canChangeEmailAddress();

Expand Down
2 changes: 1 addition & 1 deletion tests/lib/User/UserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ public function testCanChangeEmailAddress() {
$backend->expects($this->any())
->method('implementsActions')
->willReturnCallback(function ($actions) {
if ($actions === \OC\User\Backend::SET_DISPLAYNAME) {
if ($actions === \OC\User\Backend::SET_EMAILADDRESS) {
return true;
} else {
return false;
Expand Down

0 comments on commit 960b04e

Please sign in to comment.