Skip to content

Commit

Permalink
Fix phpunit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <louis@chmn.me>

[skip ci]
  • Loading branch information
artonge authored and backportbot[bot] committed Feb 1, 2024
1 parent ccd8f4e commit 252137a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion tests/Unit/Controller/MetaDataControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
use OCP\AppFramework\OCS\OCSBadRequestException;
use OCP\AppFramework\OCS\OCSForbiddenException;
use OCP\AppFramework\OCS\OCSNotFoundException;
use OCP\Files\IRootFolder;
use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
use OCP\IL10N;
Expand Down Expand Up @@ -70,6 +71,9 @@ class MetaDataControllerTest extends TestCase {
/** @var MetaDataController */
private $controller;

/** @var IRootFolder */
private $rootFolder;


protected function setUp(): void {
parent::setUp();
Expand All @@ -82,6 +86,7 @@ protected function setUp(): void {
$this->logger = $this->createMock(LoggerInterface::class);
$this->l10n = $this->createMock(IL10N::class);
$this->shareManager = $this->createMock(ShareManager::class);
$this->rootFolder = $this->createMock(IRootFolder::class);

$this->controller = new MetaDataController(
$this->appName,
Expand All @@ -91,7 +96,8 @@ protected function setUp(): void {
$this->lockManager,
$this->logger,
$this->l10n,
$this->shareManager
$this->shareManager,
$this->rootFolder,
);
}

Expand Down
8 changes: 7 additions & 1 deletion tests/Unit/Controller/MetaDataControllerV1Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
use OCP\AppFramework\OCS\OCSBadRequestException;
use OCP\AppFramework\OCS\OCSForbiddenException;
use OCP\AppFramework\OCS\OCSNotFoundException;
use OCP\Files\IRootFolder;
use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
use OCP\IL10N;
Expand Down Expand Up @@ -70,6 +71,9 @@ class MetaDataControllerV1Test extends TestCase {
/** @var MetaDataController */
private $controller;

/** @var IRootFolder */
private $rootFolder;


protected function setUp(): void {
parent::setUp();
Expand All @@ -82,6 +86,7 @@ protected function setUp(): void {
$this->logger = $this->createMock(LoggerInterface::class);
$this->l10n = $this->createMock(IL10N::class);
$this->shareManager = $this->createMock(ShareManager::class);
$this->rootFolder = $this->createMock(IRootFolder::class);

$this->controller = new MetaDataController(
$this->appName,
Expand All @@ -91,7 +96,8 @@ protected function setUp(): void {
$this->lockManager,
$this->logger,
$this->l10n,
$this->shareManager
$this->shareManager,
$this->rootFolder,
);
}

Expand Down

0 comments on commit 252137a

Please sign in to comment.