Fix server ctor including unit test - this shall never happen again

This commit is contained in:
Thomas Müller 2016-01-25 20:23:11 +01:00
parent d1104954aa
commit 92c7d15739
2 changed files with 25 additions and 1 deletions

View file

@ -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());

View file

@ -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);
}
}