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
Mon, Dec 23, 3:43 AM (1 d, 3 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
914329
Default Alt Text
CalendarHomeNotificationsTest.php (1 KB)

Event Timeline