diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2016-11-14 17:00:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-14 17:00:04 +0100 |
commit | 030118cd85486c4243d3e5e3c7f6240fe10453c4 (patch) | |
tree | b82098eb9f6d4224d6be41f2a59cd18bcb19fd5b /apps/dav | |
parent | 1e3d80641605515d2a9dbf81f7e0360e869e0b88 (diff) | |
parent | 17ea1bfb75c682ed8fc168b39a63c153abf67f18 (diff) | |
download | nextcloud-server-030118cd85486c4243d3e5e3c7f6240fe10453c4.tar.gz nextcloud-server-030118cd85486c4243d3e5e3c7f6240fe10453c4.zip |
Merge pull request #2111 from nextcloud/oc_26549
Remove unused $view from FilesPlugin (#26549)
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/FilesPlugin.php | 3 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/ServerFactory.php | 1 | ||||
-rw-r--r-- | apps/dav/lib/Server.php | 1 | ||||
-rw-r--r-- | apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php | 14 | ||||
-rw-r--r-- | apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php | 1 |
5 files changed, 1 insertions, 19 deletions
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index 539e22296f2..59b326243ee 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -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; diff --git a/apps/dav/lib/Connector/Sabre/ServerFactory.php b/apps/dav/lib/Connector/Sabre/ServerFactory.php index 6d9f9b1bc8b..24c93ee571d 100644 --- a/apps/dav/lib/Connector/Sabre/ServerFactory.php +++ b/apps/dav/lib/Connector/Sabre/ServerFactory.php @@ -153,7 +153,6 @@ class ServerFactory { $server->addPlugin( new \OCA\DAV\Connector\Sabre\FilesPlugin( $objectTree, - $view, $this->config, $this->request, $this->previewManager, diff --git a/apps/dav/lib/Server.php b/apps/dav/lib/Server.php index fca4d0ce209..1205d018241 100644 --- a/apps/dav/lib/Server.php +++ b/apps/dav/lib/Server.php @@ -171,7 +171,6 @@ class Server { $this->server->addPlugin( new FilesPlugin( $this->server->tree, - $view, \OC::$server->getConfig(), $this->request, \OC::$server->getPreviewManager(), diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php index d4e9ce9dd3e..c6e833033d5 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php @@ -68,11 +68,6 @@ class FilesPluginTest extends TestCase { private $plugin; /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject - */ - private $view; - - /** * @var \OCP\IConfig | \PHPUnit_Framework_MockObject_MockObject */ private $config; @@ -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() diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php index 2b5c9f46301..54e5283c7c1 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php @@ -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() |