Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Files/Storage/Wrapper/EncryptionTest.php')
-rw-r--r--tests/lib/Files/Storage/Wrapper/EncryptionTest.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php
index d26e5c499e7..ebb97a25c77 100644
--- a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php
+++ b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php
@@ -5,6 +5,7 @@ namespace Test\Files\Storage\Wrapper;
use OC\Encryption\Exceptions\ModuleDoesNotExistsException;
use OC\Encryption\Update;
use OC\Encryption\Util;
+use OC\Files\Cache\CacheEntry;
use OC\Files\Storage\Temporary;
use OC\Files\Storage\Wrapper\Encryption;
use OC\Files\View;
@@ -259,7 +260,7 @@ class EncryptionTest extends Storage {
->method('get')
->willReturnCallback(
function ($path) use ($encrypted) {
- return ['encrypted' => $encrypted, 'path' => $path, 'size' => 0, 'fileid' => 1];
+ return new CacheEntry(['encrypted' => $encrypted, 'path' => $path, 'size' => 0, 'fileid' => 1]);
}
);
@@ -332,7 +333,7 @@ class EncryptionTest extends Storage {
->disableOriginalConstructor()->getMock();
$cache->expects($this->any())
->method('get')
- ->willReturn(['encrypted' => true, 'path' => '/test.txt', 'size' => 0, 'fileid' => 1]);
+ ->willReturn(new CacheEntry(['encrypted' => true, 'path' => '/test.txt', 'size' => 0, 'fileid' => 1]));
$this->instance = $this->getMockBuilder('\OC\Files\Storage\Wrapper\Encryption')
->setConstructorArgs(
@@ -910,7 +911,7 @@ class EncryptionTest extends Storage {
if ($copyResult) {
$cache->expects($this->once())->method('get')
->with($sourceInternalPath)
- ->willReturn(['encrypted' => $encrypted, 'size' => 42]);
+ ->willReturn(new CacheEntry(['encrypted' => $encrypted, 'size' => 42]));
if ($encrypted) {
$instance->expects($this->once())->method('updateUnencryptedSize')
->with($mountPoint . $targetInternalPath, 42);