diff options
author | Christopher Ng <chrng8@gmail.com> | 2024-07-30 18:48:52 -0700 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2024-08-01 09:17:56 -0700 |
commit | 8f27cd6d5d4b09b4e976889d648ee7160785bf00 (patch) | |
tree | 108481472e1e33c1b5d170995e90587f787dacd3 /apps | |
parent | 0def7fa71c18f20dcdcd38f1f09391c369f52930 (diff) | |
download | nextcloud-server-8f27cd6d5d4b09b4e976889d648ee7160785bf00.tar.gz nextcloud-server-8f27cd6d5d4b09b4e976889d648ee7160785bf00.zip |
test(files): Fix ApiController test
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/tests/Controller/ApiControllerTest.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/apps/files/tests/Controller/ApiControllerTest.php b/apps/files/tests/Controller/ApiControllerTest.php index 844fabc93a3..f79a5c7bb64 100644 --- a/apps/files/tests/Controller/ApiControllerTest.php +++ b/apps/files/tests/Controller/ApiControllerTest.php @@ -14,15 +14,18 @@ use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; use OCP\Files\File; use OCP\Files\Folder; +use OCP\Files\IRootFolder; use OCP\Files\NotFoundException; use OCP\Files\SimpleFS\ISimpleFile; use OCP\Files\StorageNotAvailableException; use OCP\IConfig; +use OCP\IL10N; use OCP\IPreview; use OCP\IRequest; use OCP\IUser; use OCP\IUserSession; use OCP\Share\IManager; +use Psr\Log\LoggerInterface; use Test\TestCase; /** @@ -53,6 +56,12 @@ class ApiControllerTest extends TestCase { private $userConfig; /** @var ViewConfig|\PHPUnit\Framework\MockObject\MockObject */ private $viewConfig; + /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */ + private $l10n; + /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */ + private $rootFolder; + /** @var LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */ + private $logger; protected function setUp(): void { parent::setUp(); @@ -83,6 +92,9 @@ class ApiControllerTest extends TestCase { ->getMock(); $this->userConfig = $this->createMock(UserConfig::class); $this->viewConfig = $this->createMock(ViewConfig::class); + $this->l10n = $this->createMock(IL10N::class); + $this->rootFolder = $this->createMock(IRootFolder::class); + $this->logger = $this->createMock(LoggerInterface::class); $this->apiController = new ApiController( $this->appName, @@ -94,7 +106,10 @@ class ApiControllerTest extends TestCase { $this->config, $this->userFolder, $this->userConfig, - $this->viewConfig + $this->viewConfig, + $this->l10n, + $this->rootFolder, + $this->logger, ); } |