3 require_once 'Sabre/CalDAV/TestUtil.php';
5 class Sabre_CalDAV_ServerTest extends PHPUnit_Framework_TestCase {
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
12 function testSetup() {
14 if (!SABRE_HASSQLITE) $this->markTestSkipped('SQLite driver is not available');
15 $pdo = Sabre_CalDAV_TestUtil::getSQLiteDB();
16 $server = new Sabre_CalDAV_Server($pdo);
18 $authPlugin = $server->getPlugin('auth');
19 $this->assertTrue($authPlugin instanceof Sabre_DAV_Auth_Plugin);
21 $caldavPlugin = $server->getPlugin('caldav');
22 $this->assertTrue($caldavPlugin instanceof Sabre_CalDAV_Plugin);
24 $node = $server->tree->getNodeForPath('');
25 $this->assertTrue($node instanceof Sabre_DAV_SimpleCollection);
27 $this->assertEquals('root', $node->getName());