Skip to content

Commit

Permalink
fix: Fix UserTest to return valid configuration values
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
  • Loading branch information
come-nc committed Feb 6, 2025
1 parent a113b66 commit 11c3604
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/lib/User/UserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,12 @@ public function testSetEnabled(): void {
$this->equalTo('enabled'),
'true'
);
/* dav event listener gets the manager list from config */
$config->expects(self::any())
->method('getUserValue')
->willReturnCallback(
fn ($user, $app, $key, $default) => ($key === 'enabled' ? 'false' : $default)
);

$user = new User('foo', $backend, $this->dispatcher, null, $config);
$user->setEnabled(true);
Expand Down

0 comments on commit 11c3604

Please sign in to comment.