diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/tests/Service/TagServiceTest.php | 4 | ||||
-rw-r--r-- | apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/files/tests/Service/TagServiceTest.php b/apps/files/tests/Service/TagServiceTest.php index 4e2aeb84246..e4a41bd5d2e 100644 --- a/apps/files/tests/Service/TagServiceTest.php +++ b/apps/files/tests/Service/TagServiceTest.php @@ -27,6 +27,7 @@ namespace OCA\Files\Tests\Service; use OC\Tags; use OCA\Files\Service\TagService; use OCP\Activity\IManager; +use OCP\IUser; use OCP\IUserSession; use Symfony\Component\EventDispatcher\EventDispatcherInterface; @@ -75,8 +76,7 @@ class TagServiceTest extends \Test\TestCase { \OC::$server->getUserManager()->createUser($this->user, 'test'); \OC_User::setUserId($this->user); \OC_Util::setupFS($this->user); - /** @var \OCP\IUser */ - $user = new \OC\User\User($this->user, null); + $user = $this->createMock(IUser::class); /** * @var \OCP\IUserSession */ diff --git a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php index 452d8589a3d..b622fd5221d 100644 --- a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php +++ b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php @@ -64,7 +64,7 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { $this->globalStoragesService = $this->service; - $this->user = new \OC\User\User(self::USER_ID, null); + $this->user = $this->createMock(IUser::class); /** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject $userSession */ $userSession = $this->createMock(IUserSession::class); $userSession |