/**
* @param Tree $tree
- * @param View $view
* @param IConfig $config
* @param IRequest $request
* @param IPreview $previewManager
* @param bool $downloadAttachment
*/
public function __construct(Tree $tree,
- View $view,
IConfig $config,
IRequest $request,
IPreview $previewManager,
$isPublic = false,
$downloadAttachment = true) {
$this->tree = $tree;
- $this->fileView = $view;
$this->config = $config;
$this->request = $request;
$this->isPublic = $isPublic;
$this->server->addPlugin(
new FilesPlugin(
$this->server->tree,
- $view,
\OC::$server->getConfig(),
$this->request,
\OC::$server->getPreviewManager(),
*/
private $plugin;
- /**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject
- */
- private $view;
-
/**
* @var \OCP\IConfig | \PHPUnit_Framework_MockObject_MockObject
*/
$this->tree = $this->getMockBuilder('\Sabre\DAV\Tree')
->disableOriginalConstructor()
->getMock();
- $this->view = $this->getMockBuilder('\OC\Files\View')
- ->disableOriginalConstructor()
- ->getMock();
- $this->config = $this->getMockBuilder('\OCP\IConfig')
- ->disableOriginalConstructor()
- ->getMock();
+ $this->config = $this->createMock('\OCP\IConfig');
$this->config->expects($this->any())->method('getSystemValue')
->with($this->equalTo('data-fingerprint'), $this->equalTo(''))
->willReturn('my_fingerprint');
$this->plugin = new FilesPlugin(
$this->tree,
- $this->view,
$this->config,
$this->request,
$this->previewManager
public function testGetPublicPermissions() {
$this->plugin = new FilesPlugin(
$this->tree,
- $this->view,
$this->config,
$this->getMockBuilder('\OCP\IRequest')
->disableOriginalConstructor()