summaryrefslogtreecommitdiffstats
path: root/apps/encryption/tests
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2021-10-26 16:42:19 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2021-12-16 09:43:29 +0100
commit37f8f7a5a18e57507330036b747d4b12e58efae4 (patch)
tree4a057e03cae53d21092d06e373fa91fbad2b258f /apps/encryption/tests
parent6b770eb5799f58c41db2b3249e6e71cf69049fac (diff)
downloadnextcloud-server-37f8f7a5a18e57507330036b747d4b12e58efae4.tar.gz
nextcloud-server-37f8f7a5a18e57507330036b747d4b12e58efae4.zip
Fix tests on PHP 8.1 for encryption, files_sharing, files_version,
files_trashbin and theming apps Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/encryption/tests')
-rw-r--r--apps/encryption/tests/Crypto/EncryptAllTest.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/encryption/tests/Crypto/EncryptAllTest.php b/apps/encryption/tests/Crypto/EncryptAllTest.php
index 4a00b67f0b1..e5c10dd67e8 100644
--- a/apps/encryption/tests/Crypto/EncryptAllTest.php
+++ b/apps/encryption/tests/Crypto/EncryptAllTest.php
@@ -117,9 +117,12 @@ class EncryptAllTest extends TestCase {
$this->userInterface = $this->getMockBuilder(UserInterface::class)
->disableOriginalConstructor()->getMock();
+ /* We need format method to return a string */
+ $outputFormatter = $this->createMock(OutputFormatterInterface::class);
+ $outputFormatter->method('format')->willReturnArgument(0);
$this->outputInterface->expects($this->any())->method('getFormatter')
- ->willReturn($this->createMock(OutputFormatterInterface::class));
+ ->willReturn($outputFormatter);
$this->userManager->expects($this->any())->method('getBackends')->willReturn([$this->userInterface]);
$this->userInterface->expects($this->any())->method('getUsers')->willReturn(['user1', 'user2']);