Skip to content

Commit

Permalink
fix(tests): Adapt ManagerTest to new getAppValue call
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 22, 2024
1 parent 2155281 commit 80bc080
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/lib/Share20/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ public function testVerifyPasswordHook() {
/** @var ValidatePasswordPolicyEvent $event */
$this->assertSame('password', $event->getPassword());
}
);
);

$result = self::invokePrivate($this->manager, 'verifyPassword', ['password']);
$this->assertNull($result);
Expand All @@ -575,7 +575,7 @@ public function testVerifyPasswordHookFails() {
$this->assertSame('password', $event->getPassword());
throw new HintException('message', 'password not accepted');
}
);
);

self::invokePrivate($this->manager, 'verifyPassword', ['password']);
}
Expand Down Expand Up @@ -3000,11 +3000,12 @@ public function testGetShareByTokenWithPublicLinksDisabled() {

public function testGetShareByTokenPublicUploadDisabled() {
$this->config
->expects($this->exactly(2))
->expects($this->exactly(3))
->method('getAppValue')
->willReturnMap([
['core', 'shareapi_allow_links', 'yes', 'yes'],
['core', 'shareapi_allow_public_upload', 'yes', 'no'],
['files_sharing', 'hide_disabled_user_shares', 'no', 'no'],
]);

$share = $this->manager->newShare();
Expand Down

0 comments on commit 80bc080

Please sign in to comment.