diff options
Diffstat (limited to 'apps/files_versions/tests/Versions/VersionManagerTest.php')
-rw-r--r-- | apps/files_versions/tests/Versions/VersionManagerTest.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files_versions/tests/Versions/VersionManagerTest.php b/apps/files_versions/tests/Versions/VersionManagerTest.php index 8001d9fbf0e..79caa65d5f1 100644 --- a/apps/files_versions/tests/Versions/VersionManagerTest.php +++ b/apps/files_versions/tests/Versions/VersionManagerTest.php @@ -6,7 +6,7 @@ declare(strict_types=1); * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ -namespace OCA\files_versions\tests\Versions; +namespace OCA\Files_Versions\Tests\Versions; use OC\Files\Storage\Local; use OCA\Files_Versions\Events\VersionRestoredEvent; @@ -15,6 +15,7 @@ use OCA\Files_Versions\Versions\IVersionBackend; use OCA\Files_Versions\Versions\VersionManager; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\Storage\IStorage; +use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; class VersionManagerTest extends TestCase { @@ -25,10 +26,10 @@ class VersionManagerTest extends TestCase { return $backend; } - private function getStorage(string $class): IStorage { + private function getStorage(string $class): IStorage&MockObject { return $this->getMockBuilder($class) ->disableOriginalConstructor() - ->setMethodsExcept(['instanceOfStorage']) + ->onlyMethods(array_diff(get_class_methods($class), ['instanceOfStorage'])) ->getMock(); } |