summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-01-25 20:23:11 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-01-27 09:43:44 +0100
commit92c7d1573934eb0fef2f901d90d5303e19bc34f1 (patch)
tree406d51f34cabf19e55c942fb11d037998f5a0b61 /apps/dav
parentd1104954aa0c60c7200d401447da4b480293ef23 (diff)
downloadnextcloud-server-92c7d1573934eb0fef2f901d90d5303e19bc34f1.tar.gz
nextcloud-server-92c7d1573934eb0fef2f901d90d5303e19bc34f1.zip
Fix server ctor including unit test - this shall never happen again
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/server.php2
-rw-r--r--apps/dav/tests/unit/servertest.php24
2 files changed, 25 insertions, 1 deletions
diff --git a/apps/dav/lib/server.php b/apps/dav/lib/server.php
index 5af6905208f..3bf8e155082 100644
--- a/apps/dav/lib/server.php
+++ b/apps/dav/lib/server.php
@@ -81,7 +81,7 @@ class Server {
$this->server->addPlugin(new IMipPlugin($mailer, $logger));
$this->server->addPlugin(new \Sabre\CalDAV\Subscriptions\Plugin());
$this->server->addPlugin(new \Sabre\CalDAV\Notifications\Plugin());
- $this->server->addPlugin(new CardDAV\Sharing\Plugin($authBackend, \OC::$server->getRequest()));
+ $this->server->addPlugin(new DAV\Sharing\Plugin($authBackend, \OC::$server->getRequest()));
// addressbook plugins
$this->server->addPlugin(new \OCA\DAV\CardDAV\Plugin());
diff --git a/apps/dav/tests/unit/servertest.php b/apps/dav/tests/unit/servertest.php
new file mode 100644
index 00000000000..63bab482b45
--- /dev/null
+++ b/apps/dav/tests/unit/servertest.php
@@ -0,0 +1,24 @@
+<?php
+
+namespace OCA\DAV\Tests\Unit;
+
+use OCA\DAV\Server;
+use OCP\IRequest;
+
+/**
+ * Class ServerTest
+ *
+ * @group DB
+ *
+ * @package OCA\DAV\Tests\Unit
+ */
+class ServerTest extends \Test\TestCase {
+
+ public function test() {
+ /** @var IRequest $r */
+ $r = $this->getMockBuilder('\OCP\IRequest')
+ ->disableOriginalConstructor()->getMock();
+ $s = new Server($r, '/');
+ $this->assertNotNull($s->server);
+ }
+} \ No newline at end of file