mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
test(files): Fix ApiController test
Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
parent
0def7fa71c
commit
8f27cd6d5d
1 changed files with 16 additions and 1 deletions
|
|
@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue