From 981a65f08078a32dcd06ebf303641976576d3abe Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 23 Jun 2025 19:07:36 +0200 Subject: [PATCH] fix: create new file with content when creating test files for versioning tests Signed-off-by: Robin Appelman --- apps/files_versions/tests/StorageTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files_versions/tests/StorageTest.php b/apps/files_versions/tests/StorageTest.php index 592f03f5e63..443cff3ee06 100644 --- a/apps/files_versions/tests/StorageTest.php +++ b/apps/files_versions/tests/StorageTest.php @@ -49,10 +49,10 @@ class StorageTest extends TestCase { protected function createPastFile(string $path, int $mtime): void { try { $file = $this->userFolder->get($path); + $file->putContent((string)$mtime); } catch (NotFoundException $e) { - $file = $this->userFolder->newFile($path); + $file = $this->userFolder->newFile($path, (string)$mtime); } - $file->putContent((string)$mtime); $file->touch($mtime); }