diff --git a/tests/unit/Service/DocumentServiceTest.php b/tests/unit/Service/DocumentServiceTest.php index d9fa3a2d20e..d47e71f1855 100644 --- a/tests/unit/Service/DocumentServiceTest.php +++ b/tests/unit/Service/DocumentServiceTest.php @@ -12,12 +12,12 @@ use OCP\Files\IAppData; use OCP\Files\IRootFolder; use OCP\Files\Lock\ILockManager; -use OCP\Files\NotPermittedException; +use OCP\Files\NotFoundException; use OCP\ICacheFactory; +use OCP\ILogger; use OCP\IRequest; use OCP\Lock\ILockingProvider; use OCP\Share\IManager; -use Psr\Log\LoggerInterface; class DocumentServiceTest extends \PHPUnit\Framework\TestCase { private $documentService; @@ -45,7 +45,7 @@ public function setUp(): void { $this->userId = 'admin'; $this->rootFolder = $this->createMock(IRootFolder::class); $this->cacheFactory = $this->createMock(ICacheFactory::class); - $this->loggerInterface = $this->createMock(LoggerInterface::class); + $this->loggerInterface = $this->createMock(ILogger::class); $this->shareManager = $this->createMock(IManager::class); $this->request = $this->createMock(IRequest::class); $this->directManager = $this->createMock(\OCP\DirectEditing\IManager::class); @@ -102,7 +102,7 @@ public function testGetFileByIdNoRead() { $file = $this->createMock(\OCP\Files\File::class); $file->method('getPermissions')->willReturn(Constants::PERMISSION_UPDATE); $userFolder->method('getById')->willReturn([$file]); - $this->expectException(NotPermittedException::class); + $this->expectException(NotFoundException::class); $actual = $this->documentService->getFileById(1234); } }