Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
skip localstorage dependend user test when not using local user storage
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 authored and blizzz committed Mar 10, 2022
commit 90c27a7d3048efaa8c7e30b71df037c21e3bd3ab
12 changes: 12 additions & 0 deletions tests/lib/User/UserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -214,6 +216,16 @@ public function testDelete() {
}

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
*/
Expand Down