Page MenuHomePhabricator

CalendarHomeNotificationsTest.php
No OneTemporary

CalendarHomeNotificationsTest.php

<?php
namespace Sabre\CalDAV;
use Sabre\DAVACL;
class CalendarHomeNotificationsTest extends \PHPUnit_Framework_TestCase {
protected $backend;
function testGetChildrenNoSupport() {
$backend = new Backend\Mock();
$calendarHome = new CalendarHome($backend,['uri' => 'principals/user']);
$this->assertEquals(
[],
$calendarHome->getChildren()
);
}
/**
* @expectedException \Sabre\DAV\Exception\NotFound
*/
function testGetChildNoSupport() {
$backend = new Backend\Mock();
$calendarHome = new CalendarHome($backend,['uri' => 'principals/user']);
$calendarHome->getChild('notifications');
}
function testGetChildren() {
$backend = new Backend\MockSharing();
$calendarHome = new CalendarHome($backend,['uri' => 'principals/user']);
$result = $calendarHome->getChildren();
$this->assertEquals('notifications', $result[0]->getName());
}
function testGetChild() {
$backend = new Backend\MockSharing();
$calendarHome = new CalendarHome($backend,['uri' => 'principals/user']);
$result = $calendarHome->getChild('notifications');
$this->assertEquals('notifications', $result->getName());
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, Dec 22, 9:15 PM (2 d, 10 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
914329
Default Alt Text
CalendarHomeNotificationsTest.php (1 KB)

Event Timeline