diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-07-31 15:44:27 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2015-07-31 17:34:01 +0200 |
commit | 2e8f47dfb6fe9d4ae8861dbf9fb9ec2f20a1c3b7 (patch) | |
tree | 4c8081d415b1ae2366ecab739ed7563c5e5df712 /tests/lib/files | |
parent | cf4f43363c4cf3cfd64634a6cf33a458018a7f57 (diff) | |
download | nextcloud-server-2e8f47dfb6fe9d4ae8861dbf9fb9ec2f20a1c3b7.tar.gz nextcloud-server-2e8f47dfb6fe9d4ae8861dbf9fb9ec2f20a1c3b7.zip |
always update file cache, the cache can handle partial data correctly if the file doesn't already exists in the file cache
Diffstat (limited to 'tests/lib/files')
-rw-r--r-- | tests/lib/files/storage/wrapper/encryption.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/lib/files/storage/wrapper/encryption.php b/tests/lib/files/storage/wrapper/encryption.php index 612cf827975..c49e6bb0d1f 100644 --- a/tests/lib/files/storage/wrapper/encryption.php +++ b/tests/lib/files/storage/wrapper/encryption.php @@ -261,10 +261,12 @@ class Encryption extends \Test\Files\Storage\Storage { ->expects($this->once()) ->method('copyKeys') ->willReturn($copyKeysReturn); - $this->cache->expects($this->once()) + $this->cache->expects($this->atLeastOnce()) ->method('put') - ->with($this->anything(), ['encrypted' => true]) - ->willReturn(true); + ->willReturnCallback(function($path, $data) { + $this->assertArrayHasKey('encrypted', $data); + $this->assertTrue($data['encrypted']); + }); } else { $this->cache->expects($this->never())->method('put'); $this->keyStore->expects($this->never())->method('copyKeys'); |