From 17ea1bfb75c682ed8fc168b39a63c153abf67f18 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 7 Nov 2016 13:23:10 +0100 Subject: Remove unused $view from FilesPlugin (#26549) The Sabre FilesPlugin never uses the view so remove it. --- apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php | 14 +------------- .../tests/unit/Connector/Sabre/FilesReportPluginTest.php | 1 - 2 files changed, 1 insertion(+), 14 deletions(-) (limited to 'apps/dav/tests') 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 @@ -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() 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() -- cgit v1.2.3