From 51a67a54e06eb4119a56a0f9f21b79bdea7c43f3 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Fri, 31 Jul 2015 15:44:27 +0200 Subject: always update file cache, the cache can handle partial data correctly if the file doesn't already exists in the file cache --- tests/lib/files/storage/wrapper/encryption.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/lib') 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'); -- cgit v1.2.3