Merge pull request #53650 from nextcloud/version-test-new-file

This commit is contained in:
Kate 2025-06-24 09:14:38 +02:00 committed by GitHub
commit 6bdde907ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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