aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_versions
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_versions')
-rw-r--r--apps/files_versions/lib/Storage.php5
-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/VersioningTest.php2
4 files changed, 6 insertions, 7 deletions
diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php
index 8572b78b2c9..6d53a19a518 100644
--- a/apps/files_versions/lib/Storage.php
+++ b/apps/files_versions/lib/Storage.php
@@ -9,6 +9,7 @@
namespace OCA\Files_Versions;
use OC\Files\Filesystem;
+use OC\Files\ObjectStore\ObjectStoreStorage;
use OC\Files\Search\SearchBinaryOperator;
use OC\Files\Search\SearchComparison;
use OC\Files\Search\SearchQuery;
@@ -419,8 +420,8 @@ class Storage {
try {
// TODO add a proper way of overwriting a file while maintaining file ids
- if ($storage1->instanceOfStorage(\OC\Files\ObjectStore\ObjectStoreStorage::class)
- || $storage2->instanceOfStorage(\OC\Files\ObjectStore\ObjectStoreStorage::class)
+ if ($storage1->instanceOfStorage(ObjectStoreStorage::class)
+ || $storage2->instanceOfStorage(ObjectStoreStorage::class)
) {
$source = $storage1->fopen($internalPath1, 'r');
$result = $source !== false;
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/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