]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove unused $view from FilesPlugin (#26549) 2111/head
authorVincent Petry <pvince81@owncloud.com>
Mon, 7 Nov 2016 12:23:10 +0000 (13:23 +0100)
committerRoeland Jago Douma <roeland@famdouma.nl>
Mon, 14 Nov 2016 13:45:33 +0000 (14:45 +0100)
The Sabre FilesPlugin never uses the view so remove it.

apps/dav/lib/Connector/Sabre/FilesPlugin.php
apps/dav/lib/Connector/Sabre/ServerFactory.php
apps/dav/lib/Server.php
apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php

index 539e22296f2b9bc52f2421c0fee15597de6782e6..59b326243ee492a0c22d560026f52d9dde4acb8a 100644 (file)
@@ -115,7 +115,6 @@ class FilesPlugin extends ServerPlugin {
 
        /**
         * @param Tree $tree
-        * @param View $view
         * @param IConfig $config
         * @param IRequest $request
         * @param IPreview $previewManager
@@ -123,14 +122,12 @@ class FilesPlugin extends ServerPlugin {
         * @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;
index 6d9f9b1bc8b3a7b1f599147991f36f0e93c23b51..24c93ee571d394f777c38e8e47197f64d2f2de65 100644 (file)
@@ -153,7 +153,6 @@ class ServerFactory {
                        $server->addPlugin(
                                new \OCA\DAV\Connector\Sabre\FilesPlugin(
                                        $objectTree,
-                                       $view,
                                        $this->config,
                                        $this->request,
                                        $this->previewManager,
index fca4d0ce209fb327750acf45a1be731f34e9c78d..1205d018241035a7a50395bc83718cce9ad3c20a 100644 (file)
@@ -171,7 +171,6 @@ class Server {
                                $this->server->addPlugin(
                                        new FilesPlugin(
                                                $this->server->tree,
-                                               $view,
                                                \OC::$server->getConfig(),
                                                $this->request,
                                                \OC::$server->getPreviewManager(),
index d4e9ce9dd3e4b2864c6b4521da57732d3a96a8d3..c6e833033d59f9e2ac105d6585414a511004bae9 100644 (file)
@@ -67,11 +67,6 @@ class FilesPluginTest extends TestCase {
         */
        private $plugin;
 
-       /**
-        * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject
-        */
-       private $view;
-
        /**
         * @var \OCP\IConfig | \PHPUnit_Framework_MockObject_MockObject
         */
@@ -95,12 +90,7 @@ class FilesPluginTest extends TestCase {
                $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');
@@ -113,7 +103,6 @@ class FilesPluginTest extends TestCase {
 
                $this->plugin = new FilesPlugin(
                        $this->tree,
-                       $this->view,
                        $this->config,
                        $this->request,
                        $this->previewManager
@@ -246,7 +235,6 @@ class FilesPluginTest extends TestCase {
        public function testGetPublicPermissions() {
                $this->plugin = new FilesPlugin(
                        $this->tree,
-                       $this->view,
                        $this->config,
                        $this->getMockBuilder('\OCP\IRequest')
                                ->disableOriginalConstructor()
index 2b5c9f4630181c75f246e4d512dcbcc6d7081a0c..54e5283c7c1464a269443ffa9677b3eec3d8abe3 100644 (file)
@@ -380,7 +380,6 @@ class FilesReportPluginTest extends \Test\TestCase {
                $this->server->addPlugin(
                        new \OCA\DAV\Connector\Sabre\FilesPlugin(
                                $this->tree,
-                               $this->view,
                                $config,
                                $this->getMockBuilder('\OCP\IRequest')
                                        ->disableOriginalConstructor()