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 2025-06-23 19:07:36 +07:00
parent 968ed2caae
commit 981a65f080
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
1 changed files with 2 additions and 2 deletions

@ -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);
}