From 101e3f79121d121150129ecc9fa9949a747d887e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Thu, 25 Oct 2018 18:57:37 +0200 Subject: [PATCH] Rename file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- .../composer/composer/autoload_classmap.php | 2 +- .../dav/composer/composer/autoload_static.php | 2 +- ...ortPlugin.php => MultiGetExportPlugin.php} | 2 +- apps/dav/lib/Server.php | 4 +- .../unit/CardDAV/VCFMultiExportPluginTest.php | 82 ------------------- 5 files changed, 5 insertions(+), 87 deletions(-) rename apps/dav/lib/CardDAV/{VCFMultiExportPlugin.php => MultiGetExportPlugin.php} (98%) delete mode 100644 apps/dav/tests/unit/CardDAV/VCFMultiExportPluginTest.php diff --git a/apps/dav/composer/composer/autoload_classmap.php b/apps/dav/composer/composer/autoload_classmap.php index 586925f2cd166..77fe672b4eabc 100644 --- a/apps/dav/composer/composer/autoload_classmap.php +++ b/apps/dav/composer/composer/autoload_classmap.php @@ -65,11 +65,11 @@ 'OCA\\DAV\\CardDAV\\ContactsManager' => $baseDir . '/../lib/CardDAV/ContactsManager.php', 'OCA\\DAV\\CardDAV\\Converter' => $baseDir . '/../lib/CardDAV/Converter.php', 'OCA\\DAV\\CardDAV\\ImageExportPlugin' => $baseDir . '/../lib/CardDAV/ImageExportPlugin.php', + 'OCA\\DAV\\CardDAV\\MultiGetExportPlugin' => $baseDir . '/../lib/CardDAV/MultiGetExportPlugin.php', 'OCA\\DAV\\CardDAV\\PhotoCache' => $baseDir . '/../lib/CardDAV/PhotoCache.php', 'OCA\\DAV\\CardDAV\\Plugin' => $baseDir . '/../lib/CardDAV/Plugin.php', 'OCA\\DAV\\CardDAV\\SyncService' => $baseDir . '/../lib/CardDAV/SyncService.php', 'OCA\\DAV\\CardDAV\\UserAddressBooks' => $baseDir . '/../lib/CardDAV/UserAddressBooks.php', - 'OCA\\DAV\\CardDAV\\VCFMultiExportPlugin' => $baseDir . '/../lib/CardDAV/VCFMultiExportPlugin.php', 'OCA\\DAV\\CardDAV\\Xml\\Groups' => $baseDir . '/../lib/CardDAV/Xml/Groups.php', 'OCA\\DAV\\Command\\CreateAddressBook' => $baseDir . '/../lib/Command/CreateAddressBook.php', 'OCA\\DAV\\Command\\CreateCalendar' => $baseDir . '/../lib/Command/CreateCalendar.php', diff --git a/apps/dav/composer/composer/autoload_static.php b/apps/dav/composer/composer/autoload_static.php index 00aaf9b3b2ff0..b248eaa18b01a 100644 --- a/apps/dav/composer/composer/autoload_static.php +++ b/apps/dav/composer/composer/autoload_static.php @@ -80,11 +80,11 @@ class ComposerStaticInitDAV 'OCA\\DAV\\CardDAV\\ContactsManager' => __DIR__ . '/..' . '/../lib/CardDAV/ContactsManager.php', 'OCA\\DAV\\CardDAV\\Converter' => __DIR__ . '/..' . '/../lib/CardDAV/Converter.php', 'OCA\\DAV\\CardDAV\\ImageExportPlugin' => __DIR__ . '/..' . '/../lib/CardDAV/ImageExportPlugin.php', + 'OCA\\DAV\\CardDAV\\MultiGetExportPlugin' => __DIR__ . '/..' . '/../lib/CardDAV/MultiGetExportPlugin.php', 'OCA\\DAV\\CardDAV\\PhotoCache' => __DIR__ . '/..' . '/../lib/CardDAV/PhotoCache.php', 'OCA\\DAV\\CardDAV\\Plugin' => __DIR__ . '/..' . '/../lib/CardDAV/Plugin.php', 'OCA\\DAV\\CardDAV\\SyncService' => __DIR__ . '/..' . '/../lib/CardDAV/SyncService.php', 'OCA\\DAV\\CardDAV\\UserAddressBooks' => __DIR__ . '/..' . '/../lib/CardDAV/UserAddressBooks.php', - 'OCA\\DAV\\CardDAV\\VCFMultiExportPlugin' => __DIR__ . '/..' . '/../lib/CardDAV/VCFMultiExportPlugin.php', 'OCA\\DAV\\CardDAV\\Xml\\Groups' => __DIR__ . '/..' . '/../lib/CardDAV/Xml/Groups.php', 'OCA\\DAV\\Command\\CreateAddressBook' => __DIR__ . '/..' . '/../lib/Command/CreateAddressBook.php', 'OCA\\DAV\\Command\\CreateCalendar' => __DIR__ . '/..' . '/../lib/Command/CreateCalendar.php', diff --git a/apps/dav/lib/CardDAV/VCFMultiExportPlugin.php b/apps/dav/lib/CardDAV/MultiGetExportPlugin.php similarity index 98% rename from apps/dav/lib/CardDAV/VCFMultiExportPlugin.php rename to apps/dav/lib/CardDAV/MultiGetExportPlugin.php index 83b99c3248e0b..1798c6029ad8c 100644 --- a/apps/dav/lib/CardDAV/VCFMultiExportPlugin.php +++ b/apps/dav/lib/CardDAV/MultiGetExportPlugin.php @@ -29,7 +29,7 @@ use Sabre\HTTP\RequestInterface; use Sabre\HTTP\ResponseInterface; -class VCFMultiExportPlugin extends DAV\ServerPlugin { +class MultiGetExportPlugin extends DAV\ServerPlugin { /** @var Server */ protected $server; diff --git a/apps/dav/lib/Server.php b/apps/dav/lib/Server.php index a64493f79c6cc..c8d223b18b84e 100644 --- a/apps/dav/lib/Server.php +++ b/apps/dav/lib/Server.php @@ -34,7 +34,7 @@ use OCA\DAV\CalDAV\BirthdayService; use OCA\DAV\CardDAV\ImageExportPlugin; -use OCA\DAV\CardDAV\VCFMultiExportPlugin; +use OCA\DAV\CardDAV\MultiGetExportPlugin; use OCA\DAV\CardDAV\PhotoCache; use OCA\DAV\Comments\CommentsPlugin; use OCA\DAV\Connector\Sabre\Auth; @@ -163,7 +163,7 @@ public function __construct(IRequest $request, $baseUri) { $this->server->addPlugin(new DAV\Sharing\Plugin($authBackend, \OC::$server->getRequest())); $this->server->addPlugin(new \OCA\DAV\CardDAV\Plugin()); $this->server->addPlugin(new VCFExportPlugin()); - $this->server->addPlugin(new VCFMultiExportPlugin()); + $this->server->addPlugin(new MultiGetExportPlugin()); $this->server->addPlugin(new ImageExportPlugin(new PhotoCache(\OC::$server->getAppDataDir('dav-photocache')))); } diff --git a/apps/dav/tests/unit/CardDAV/VCFMultiExportPluginTest.php b/apps/dav/tests/unit/CardDAV/VCFMultiExportPluginTest.php deleted file mode 100644 index 845a9b835bebd..0000000000000 --- a/apps/dav/tests/unit/CardDAV/VCFMultiExportPluginTest.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * @author John Molakvoæ - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -namespace OCA\DAV\Tests\unit\CardDAV; - -use OCA\DAV\CardDAV\AddressBook; -use OCA\DAV\CardDAV\VCFMultiExportPlugin; -use OCP\Files\NotFoundException; -use OCP\Files\SimpleFS\ISimpleFile; -use Sabre\CardDAV\Card; -use Sabre\DAV\Node; -use Sabre\DAV\Server; -use Sabre\DAV\Tree; -use Sabre\HTTP\RequestInterface; -use Sabre\HTTP\ResponseInterface; -use Test\TestCase; - -class VCFMultiExportPluginTest extends TestCase { - - /** @var ResponseInterface|\PHPUnit_Framework_MockObject_MockObject */ - private $response; - /** @var RequestInterface|\PHPUnit_Framework_MockObject_MockObject */ - private $request; - /** @var VCFMultiExportPlugin|\PHPUnit_Framework_MockObject_MockObject */ - private $plugin; - /** @var Server */ - private $server; - /** @var Tree|\PHPUnit_Framework_MockObject_MockObject */ - private $tree; - - function setUp() { - parent::setUp(); - - $this->request = $this->createMock(RequestInterface::class); - $this->response = $this->createMock(ResponseInterface::class); - $this->server = $this->createMock(Server::class); - $this->tree = $this->createMock(Tree::class); - $this->server->tree = $this->tree; - - $this->plugin = $this->createMock(VCFMultiExportPlugin::class); - $this->plugin->initialize($this->server); - } - - /** - * @dataProvider providesQueryParams - * @param $param - */ - public function testQueryParams($param) { - $this->request->expects($this->once())->method('getQueryParameters')->willReturn($param); - $result = $this->plugin->httpGet($this->request, $this->response); - $this->assertTrue($result); - } - - public function providesQueryParams() { - return [ - [[]], - [['1']], - [['foo' => 'bar']] - ]; - } -}