diff options
author | Joas Schilling <coding@schilljs.com> | 2018-01-25 11:32:27 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2018-01-25 11:33:26 +0100 |
commit | 3917a54113c80420e9a27f23845ea4381c2b0109 (patch) | |
tree | c088f542d9a7a6b0ef8e818ca367515371277f2a /tests/lib/Encryption/DecryptAllTest.php | |
parent | bf2be08c9f3b6957a3327929a169eb6204e84cd0 (diff) | |
download | nextcloud-server-3917a54113c80420e9a27f23845ea4381c2b0109.tar.gz nextcloud-server-3917a54113c80420e9a27f23845ea4381c2b0109.zip |
Class "ProgressBar" is declared "final" and cannot be mocked.
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/Encryption/DecryptAllTest.php')
-rw-r--r-- | tests/lib/Encryption/DecryptAllTest.php | 7 |
1 files changed, 5 insertions, 2 deletions
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, '']); |