From afcbdf53ddf062c32490cb8215bc3a657a4f4e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 22 Feb 2024 10:39:06 +0100 Subject: [PATCH] fix(tests): Fix moveFromStorage test for encryption wrapper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- tests/lib/Files/Storage/Storage.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/lib/Files/Storage/Storage.php b/tests/lib/Files/Storage/Storage.php index 345964e9444..b3821abfe28 100644 --- a/tests/lib/Files/Storage/Storage.php +++ b/tests/lib/Files/Storage/Storage.php @@ -730,6 +730,13 @@ abstract class Storage extends \Test\TestCase { ->method('filemtime') ->with($source) ->willReturn($mTime); + $instance->expects(static::any()) + ->method('getId') + ->willReturn('fakeid'); + $cache = $this->createMock(\OCP\Files\Cache\ICache::class); + $instance->expects(static::any()) + ->method('getCache') + ->willReturn($cache); $this->assertFalse($this->instance->file_exists($target)); $this->instance->moveFromStorage($instance, $source, $target);