aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_versions/tests
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_versions/tests')
-rw-r--r--apps/files_versions/tests/Command/CleanupTest.php2
-rw-r--r--apps/files_versions/tests/ExpirationTest.php4
-rw-r--r--apps/files_versions/tests/StorageTest.php4
-rw-r--r--apps/files_versions/tests/VersioningTest.php2
4 files changed, 5 insertions, 7 deletions
diff --git a/apps/files_versions/tests/Command/CleanupTest.php b/apps/files_versions/tests/Command/CleanupTest.php
index b0a5c0ca268..dd6665f5aef 100644
--- a/apps/files_versions/tests/Command/CleanupTest.php
+++ b/apps/files_versions/tests/Command/CleanupTest.php
@@ -43,9 +43,9 @@ class CleanupTest extends TestCase {
}
/**
- * @dataProvider dataTestDeleteVersions
* @param boolean $nodeExists
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestDeleteVersions')]
public function testDeleteVersions(bool $nodeExists): void {
$this->rootFolder->expects($this->once())
->method('nodeExists')
diff --git a/apps/files_versions/tests/ExpirationTest.php b/apps/files_versions/tests/ExpirationTest.php
index 866e4861741..8cf412c3fe0 100644
--- a/apps/files_versions/tests/ExpirationTest.php
+++ b/apps/files_versions/tests/ExpirationTest.php
@@ -81,9 +81,7 @@ class ExpirationTest extends \Test\TestCase {
];
}
- /**
- * @dataProvider expirationData
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('expirationData')]
public function testExpiration(string $retentionObligation, int $timeNow, int $timestamp, bool $quotaExceeded, bool $expectedResult): void {
$mockedConfig = $this->getMockedConfig($retentionObligation);
$mockedTimeFactory = $this->getMockedTimeFactory($timeNow);
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);
}
diff --git a/apps/files_versions/tests/VersioningTest.php b/apps/files_versions/tests/VersioningTest.php
index 659b2cff10c..c9f7d27d7ab 100644
--- a/apps/files_versions/tests/VersioningTest.php
+++ b/apps/files_versions/tests/VersioningTest.php
@@ -140,8 +140,8 @@ class VersioningTest extends \Test\TestCase {
/**
* @medium
* test expire logic
- * @dataProvider versionsProvider
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('versionsProvider')]
public function testGetExpireList($versions, $sizeOfAllDeletedFiles): void {
// last interval end at 2592000