summaryrefslogtreecommitdiffstats
path: root/tests/lib/files/stream
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-05-12 18:49:25 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2015-05-18 10:15:17 +0200
commit887be709f5f0dbbc6ad7b1cc1a9793d04421c5b9 (patch)
tree15cfcb45871688ecd6208f461b0d1e25171a917f /tests/lib/files/stream
parent73a3086945b41afa39debd89481c021934dedb67 (diff)
downloadnextcloud-server-887be709f5f0dbbc6ad7b1cc1a9793d04421c5b9.tar.gz
nextcloud-server-887be709f5f0dbbc6ad7b1cc1a9793d04421c5b9.zip
a new approach to display the error message
Diffstat (limited to 'tests/lib/files/stream')
-rw-r--r--tests/lib/files/stream/encryption.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/lib/files/stream/encryption.php b/tests/lib/files/stream/encryption.php
index 892491cbc32..113cd14ada7 100644
--- a/tests/lib/files/stream/encryption.php
+++ b/tests/lib/files/stream/encryption.php
@@ -253,13 +253,14 @@ class Encryption extends \Test\TestCase {
protected function buildMockModule() {
$encryptionModule = $this->getMockBuilder('\OCP\Encryption\IEncryptionModule')
->disableOriginalConstructor()
- ->setMethods(['getId', 'getDisplayName', 'begin', 'end', 'encrypt', 'decrypt', 'update', 'shouldEncrypt', 'getUnencryptedBlockSize'])
+ ->setMethods(['getId', 'getDisplayName', 'begin', 'end', 'encrypt', 'decrypt', 'update', 'shouldEncrypt', 'getUnencryptedBlockSize', 'isReadable'])
->getMock();
$encryptionModule->expects($this->any())->method('getId')->willReturn('UNIT_TEST_MODULE');
$encryptionModule->expects($this->any())->method('getDisplayName')->willReturn('Unit test module');
$encryptionModule->expects($this->any())->method('begin')->willReturn([]);
$encryptionModule->expects($this->any())->method('end')->willReturn('');
+ $encryptionModule->expects($this->any())->method('isReadable')->willReturn(true);
$encryptionModule->expects($this->any())->method('encrypt')->willReturnCallback(function($data) {
// simulate different block size by adding some padding to the data
if (isset($data[6125])) {