Merge pull request #2111 from nextcloud/oc_26549

Remove unused $view from FilesPlugin (#26549)
This commit is contained in:
Roeland Jago Douma 2016-11-14 17:00:04 +01:00 committed by GitHub
commit 030118cd85
5 changed files with 1 additions and 19 deletions

View File

@ -115,7 +115,6 @@ class FilesPlugin extends ServerPlugin {
/** /**
* @param Tree $tree * @param Tree $tree
* @param View $view
* @param IConfig $config * @param IConfig $config
* @param IRequest $request * @param IRequest $request
* @param IPreview $previewManager * @param IPreview $previewManager
@ -123,14 +122,12 @@ class FilesPlugin extends ServerPlugin {
* @param bool $downloadAttachment * @param bool $downloadAttachment
*/ */
public function __construct(Tree $tree, public function __construct(Tree $tree,
View $view,
IConfig $config, IConfig $config,
IRequest $request, IRequest $request,
IPreview $previewManager, IPreview $previewManager,
$isPublic = false, $isPublic = false,
$downloadAttachment = true) { $downloadAttachment = true) {
$this->tree = $tree; $this->tree = $tree;
$this->fileView = $view;
$this->config = $config; $this->config = $config;
$this->request = $request; $this->request = $request;
$this->isPublic = $isPublic; $this->isPublic = $isPublic;

View File

@ -153,7 +153,6 @@ class ServerFactory {
$server->addPlugin( $server->addPlugin(
new \OCA\DAV\Connector\Sabre\FilesPlugin( new \OCA\DAV\Connector\Sabre\FilesPlugin(
$objectTree, $objectTree,
$view,
$this->config, $this->config,
$this->request, $this->request,
$this->previewManager, $this->previewManager,

View File

@ -171,7 +171,6 @@ class Server {
$this->server->addPlugin( $this->server->addPlugin(
new FilesPlugin( new FilesPlugin(
$this->server->tree, $this->server->tree,
$view,
\OC::$server->getConfig(), \OC::$server->getConfig(),
$this->request, $this->request,
\OC::$server->getPreviewManager(), \OC::$server->getPreviewManager(),

View File

@ -67,11 +67,6 @@ class FilesPluginTest extends TestCase {
*/ */
private $plugin; private $plugin;
/**
* @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject
*/
private $view;
/** /**
* @var \OCP\IConfig | \PHPUnit_Framework_MockObject_MockObject * @var \OCP\IConfig | \PHPUnit_Framework_MockObject_MockObject
*/ */
@ -95,12 +90,7 @@ class FilesPluginTest extends TestCase {
$this->tree = $this->getMockBuilder('\Sabre\DAV\Tree') $this->tree = $this->getMockBuilder('\Sabre\DAV\Tree')
->disableOriginalConstructor() ->disableOriginalConstructor()
->getMock(); ->getMock();
$this->view = $this->getMockBuilder('\OC\Files\View') $this->config = $this->createMock('\OCP\IConfig');
->disableOriginalConstructor()
->getMock();
$this->config = $this->getMockBuilder('\OCP\IConfig')
->disableOriginalConstructor()
->getMock();
$this->config->expects($this->any())->method('getSystemValue') $this->config->expects($this->any())->method('getSystemValue')
->with($this->equalTo('data-fingerprint'), $this->equalTo('')) ->with($this->equalTo('data-fingerprint'), $this->equalTo(''))
->willReturn('my_fingerprint'); ->willReturn('my_fingerprint');
@ -113,7 +103,6 @@ class FilesPluginTest extends TestCase {
$this->plugin = new FilesPlugin( $this->plugin = new FilesPlugin(
$this->tree, $this->tree,
$this->view,
$this->config, $this->config,
$this->request, $this->request,
$this->previewManager $this->previewManager
@ -246,7 +235,6 @@ class FilesPluginTest extends TestCase {
public function testGetPublicPermissions() { public function testGetPublicPermissions() {
$this->plugin = new FilesPlugin( $this->plugin = new FilesPlugin(
$this->tree, $this->tree,
$this->view,
$this->config, $this->config,
$this->getMockBuilder('\OCP\IRequest') $this->getMockBuilder('\OCP\IRequest')
->disableOriginalConstructor() ->disableOriginalConstructor()

View File

@ -380,7 +380,6 @@ class FilesReportPluginTest extends \Test\TestCase {
$this->server->addPlugin( $this->server->addPlugin(
new \OCA\DAV\Connector\Sabre\FilesPlugin( new \OCA\DAV\Connector\Sabre\FilesPlugin(
$this->tree, $this->tree,
$this->view,
$config, $config,
$this->getMockBuilder('\OCP\IRequest') $this->getMockBuilder('\OCP\IRequest')
->disableOriginalConstructor() ->disableOriginalConstructor()