]> git.mxchange.org Git - friendica-addons.git/blob - dav/SabreDAV/tests/Sabre/CalDAV/ServerTest.php
Merge branch '3.6-release'
[friendica-addons.git] / dav / SabreDAV / tests / Sabre / CalDAV / ServerTest.php
1 <?php
2
3 require_once 'Sabre/CalDAV/TestUtil.php';
4
5 class Sabre_CalDAV_ServerTest extends PHPUnit_Framework_TestCase {
6
7     /**
8      * The CalDAV server is a simple script that just composes a
9      * Sabre_DAV_Server. All we really have to do is check if the setup
10      * is done correctly.
11      */
12     function testSetup() {
13
14         if (!SABRE_HASSQLITE) $this->markTestSkipped('SQLite driver is not available');
15         $pdo = Sabre_CalDAV_TestUtil::getSQLiteDB();
16         $server = new Sabre_CalDAV_Server($pdo);
17
18         $authPlugin = $server->getPlugin('auth');
19         $this->assertTrue($authPlugin instanceof Sabre_DAV_Auth_Plugin);
20
21         $caldavPlugin = $server->getPlugin('caldav');
22         $this->assertTrue($caldavPlugin instanceof Sabre_CalDAV_Plugin);
23
24         $node = $server->tree->getNodeForPath('');
25         $this->assertTrue($node instanceof Sabre_DAV_SimpleCollection);
26
27         $this->assertEquals('root', $node->getName());
28
29     }
30
31 }