Fix server ctor including unit test - this shall never happen again
This commit is contained in:
parent
d1104954aa
commit
92c7d15739
2 changed files with 25 additions and 1 deletions
|
@ -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());
|
||||
|
|
24
apps/dav/tests/unit/servertest.php
Normal file
24
apps/dav/tests/unit/servertest.php
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue