diff options
author | Robin Appelman <robin@icewind.nl> | 2025-06-23 19:07:36 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2025-06-23 19:07:36 +0200 |
commit | 981a65f08078a32dcd06ebf303641976576d3abe (patch) | |
tree | f4927e846127e2f895f48ed651b37162fb663449 | |
parent | 968ed2caaeecb914d543fe3222363389a34f7a3d (diff) | |
download | nextcloud-server-version-test-new-file.tar.gz nextcloud-server-version-test-new-file.zip |
fix: create new file with content when creating test files for versioning testsversion-test-new-file
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r-- | apps/files_versions/tests/StorageTest.php | 4 |
1 files 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); } |