fix: create new file with content when creating test files for versioning tests

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/53650/head
Robin Appelman 7 months ago
parent 968ed2caae
commit 981a65f080
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
  1. 4
      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);
}

Loading…
Cancel
Save