summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/encryption/tests/Crypto/EncryptAllTest.php6
-rw-r--r--tests/lib/Encryption/DecryptAllTest.php7
2 files changed, 9 insertions, 4 deletions
diff --git a/apps/encryption/tests/Crypto/EncryptAllTest.php b/apps/encryption/tests/Crypto/EncryptAllTest.php
index 0d894ab6fd7..a39bf7befb6 100644
--- a/apps/encryption/tests/Crypto/EncryptAllTest.php
+++ b/apps/encryption/tests/Crypto/EncryptAllTest.php
@@ -335,8 +335,10 @@ class EncryptAllTest extends TestCase {
$encryptAll->expects($this->at(1))->method('encryptFile')->with('/user1/files/bar');
$encryptAll->expects($this->at(2))->method('encryptFile')->with('/user1/files/foo/subfile');
- $progressBar = $this->getMockBuilder(ProgressBar::class)
- ->disableOriginalConstructor()->getMock();
+ $this->outputInterface->expects($this->any())
+ ->method('getFormatter')
+ ->willReturn($this->createMock(OutputFormatterInterface::class));
+ $progressBar = new ProgressBar($this->outputInterface);
$this->invokePrivate($encryptAll, 'encryptUsersFiles', ['user1', $progressBar, '']);
diff --git a/tests/lib/Encryption/DecryptAllTest.php b/tests/lib/Encryption/DecryptAllTest.php
index c2b7bd17149..59c24fb3c1d 100644
--- a/tests/lib/Encryption/DecryptAllTest.php
+++ b/tests/lib/Encryption/DecryptAllTest.php
@@ -301,8 +301,11 @@ class DecryptAllTest extends TestCase {
->method('decryptFile')
->with('/user1/files/foo/subfile');
- $progressBar = $this->getMockBuilder(ProgressBar::class)
- ->disableOriginalConstructor()->getMock();
+ $output = $this->createMock(OutputInterface::class);
+ $output->expects($this->any())
+ ->method('getFormatter')
+ ->willReturn($this->createMock(OutputFormatterInterface::class));
+ $progressBar = new ProgressBar($output);
$this->invokePrivate($instance, 'decryptUsersFiles', ['user1', $progressBar, '']);