From 90c27a7d3048efaa8c7e30b71df037c21e3bd3ab Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 25 Feb 2022 16:01:16 +0100 Subject: skip localstorage dependend user test when not using local user storage Signed-off-by: Robin Appelman --- tests/lib/User/UserTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') diff --git a/tests/lib/User/UserTest.php b/tests/lib/User/UserTest.php index aa56959d3cb..7fab7ececca 100644 --- a/tests/lib/User/UserTest.php +++ b/tests/lib/User/UserTest.php @@ -10,9 +10,11 @@ namespace Test\User; use OC\AllConfig; +use OC\Files\Mount\ObjectHomeMountProvider; use OC\Hooks\PublicEmitter; use OC\User\User; use OCP\Comments\ICommentsManager; +use OCP\Files\Storage\IStorageFactory; use OCP\IConfig; use OCP\IUser; use OCP\Notification\IManager as INotificationManager; @@ -214,6 +216,16 @@ class UserTest extends TestCase { } public function testDeleteWithDifferentHome() { + + /** @var ObjectHomeMountProvider $homeProvider */ + $homeProvider = \OC::$server->get(ObjectHomeMountProvider::class); + $user = $this->createMock(IUser::class); + $user->method('getUID') + ->willReturn('foo'); + if ($homeProvider->getHomeMountForUser($user, $this->createMock(IStorageFactory::class)) !== null) { + $this->markTestSkipped("Skipping test for non local home storage"); + } + /** * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ -- cgit v1.2.3