Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-01-12 13:28:04 +0300
committerJulius Härtl <jus@bitgrid.net>2021-01-28 13:59:46 +0300
commit497440477492b6e7df8ca1eb6c79eb7100a2fe24 (patch)
tree66050dc6e96bb1f7c78fb0729761c017410d5636 /apps/files/tests
parent7e7284d790f55a14ec100771c08809e32514c533 (diff)
files: Create files from template API
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/files/tests')
-rw-r--r--apps/files/tests/Controller/ViewControllerTest.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/files/tests/Controller/ViewControllerTest.php b/apps/files/tests/Controller/ViewControllerTest.php
index fc2b82de9c8..bc233599e34 100644
--- a/apps/files/tests/Controller/ViewControllerTest.php
+++ b/apps/files/tests/Controller/ViewControllerTest.php
@@ -36,10 +36,12 @@ use OCA\Files\Activity\Helper;
use OCA\Files\Controller\ViewController;
use OCP\App\IAppManager;
use OCP\AppFramework\Http;
+use OCP\AppFramework\Services\IInitialState;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\File;
use OCP\Files\Folder;
use OCP\Files\IRootFolder;
+use OCP\Files\Template\ITemplateManager;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IRequest;
@@ -78,6 +80,10 @@ class ViewControllerTest extends TestCase {
private $rootFolder;
/** @var Helper|\PHPUnit\Framework\MockObject\MockObject */
private $activityHelper;
+ /** @var IInitialState|\PHPUnit\Framework\MockObject\MockObject */
+ private $initialState;
+ /** @var ITemplateManager|\PHPUnit\Framework\MockObject\MockObject */
+ private $templateManager;
protected function setUp(): void {
parent::setUp();
@@ -97,6 +103,8 @@ class ViewControllerTest extends TestCase {
->willReturn($this->user);
$this->rootFolder = $this->getMockBuilder('\OCP\Files\IRootFolder')->getMock();
$this->activityHelper = $this->createMock(Helper::class);
+ $this->initialState = $this->createMock(IInitialState::class);
+ $this->templateManager = $this->createMock(ITemplateManager::class);
$this->viewController = $this->getMockBuilder('\OCA\Files\Controller\ViewController')
->setConstructorArgs([
'files',
@@ -109,6 +117,8 @@ class ViewControllerTest extends TestCase {
$this->appManager,
$this->rootFolder,
$this->activityHelper,
+ $this->initialState,
+ $this->templateManager,
])
->setMethods([
'getStorageInfo',