diff options
author | Robin Appelman <robin@icewind.nl> | 2022-02-25 16:01:16 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2022-02-25 16:33:11 +0100 |
commit | d08d0ebdda82bdbc8c5cc5f7432e98a913fa2321 (patch) | |
tree | 9cd674e701265f6599b0c9cb13deb22ef76e6521 /tests/lib | |
parent | ad10a3331693c90c47d04c7ac6883aa5ca1ed5c6 (diff) | |
download | nextcloud-server-d08d0ebdda82bdbc8c5cc5f7432e98a913fa2321.tar.gz nextcloud-server-d08d0ebdda82bdbc8c5cc5f7432e98a913fa2321.zip |
skip localstorage dependend user test when not using local user storage
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/User/UserTest.php | 12 |
1 files changed, 12 insertions, 0 deletions
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 */ |