Definition at line 11 of file FreeBusyReportTest.php.
◆ setUp()
Sabre\CalDAV\FreeBusyReportTest::setUp |
( |
| ) |
|
Definition at line 22 of file FreeBusyReportTest.php.
References $caldavBackend, $calendar, $request, Sabre\HTTP\Sapi\createFromServerArray(), and Sabre\CalDAV\Plugin\NS_CALDAV.
27 DTSTART:20111005T120000Z
33 $obj2 =
fopen(
'php://memory',
'r+');
37 DTSTART:20121005T120000Z
48 DTSTART:20111006T120000
58 'uri' =>
'event1.ics',
59 'calendardata' => $obj1,
63 'uri' =>
'event2.ics',
64 'calendardata' => $obj2
68 'uri' =>
'event3.ics',
69 'calendardata' => $obj3
80 'principaluri' =>
'principals/user1',
81 '{' .
Plugin::NS_CALDAV .
'}calendar-timezone' =>
"BEGIN:VCALENDAR\r\nBEGIN:VTIMEZONE\r\nTZID:Europe/Berlin\r\nEND:VTIMEZONE\r\nEND:VCALENDAR",
84 $this->server =
new DAV\Server([
$calendar]);
87 'REQUEST_URI' =>
'/calendar',
89 $this->server->httpRequest =
$request;
90 $this->server->httpResponse =
new HTTP\ResponseMock();
92 $this->plugin =
new Plugin();
93 $this->server->addPlugin($this->plugin);
foreach($paths as $path) $request
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
const NS_CALDAV
This is the official CalDAV namespace.
◆ testFreeBusyReport()
Sabre\CalDAV\FreeBusyReportTest::testFreeBusyReport |
( |
| ) |
|
Definition at line 97 of file FreeBusyReportTest.php.
100 <?xml version=
"1.0"?>
101 <c:free-busy-query xmlns:c=
"urn:ietf:params:xml:ns:caldav">
102 <c:time-range start=
"20111001T000000Z" end=
"20111101T000000Z" />
106 $report = $this->server->xml->parse($reportXML, null, $rootElem);
107 $this->plugin->report($rootElem, $report, null);
109 $this->assertEquals(200, $this->server->httpResponse->status);
110 $this->assertEquals(
'text/calendar', $this->server->httpResponse->getHeader(
'Content-Type'));
111 $this->assertTrue(strpos($this->server->httpResponse->body,
'BEGIN:VFREEBUSY') !==
false);
112 $this->assertTrue(strpos($this->server->httpResponse->body,
'20111005T120000Z/20111005T130000Z') !==
false);
113 $this->assertTrue(strpos($this->server->httpResponse->body,
'20111006T100000Z/20111006T110000Z') !==
false);
◆ testFreeBusyReportNoACLPlugin()
Sabre\CalDAV\FreeBusyReportTest::testFreeBusyReportNoACLPlugin |
( |
| ) |
|
Sabre
Definition at line 157 of file FreeBusyReportTest.php.
159 $this->server =
new DAV\Server();
160 $this->plugin =
new Plugin();
161 $this->server->addPlugin($this->plugin);
164 <?xml version=
"1.0"?>
165 <c:free-busy-query xmlns:c=
"urn:ietf:params:xml:ns:caldav">
166 <c:time-range start=
"20111001T000000Z" end=
"20111101T000000Z" />
170 $report = $this->server->xml->parse($reportXML, null, $rootElem);
171 $this->plugin->report($rootElem, $report, null);
◆ testFreeBusyReportNoTimeRange()
Sabre\CalDAV\FreeBusyReportTest::testFreeBusyReportNoTimeRange |
( |
| ) |
|
Sabre
Definition at line 120 of file FreeBusyReportTest.php.
123 <?xml version=
"1.0"?>
124 <c:free-busy-query xmlns:c=
"urn:ietf:params:xml:ns:caldav">
128 $report = $this->server->xml->parse($reportXML, null, $rootElem);
◆ testFreeBusyReportWrongNode()
Sabre\CalDAV\FreeBusyReportTest::testFreeBusyReportWrongNode |
( |
| ) |
|
Sabre
Definition at line 135 of file FreeBusyReportTest.php.
References $request, and Sabre\HTTP\Sapi\createFromServerArray().
138 'REQUEST_URI' =>
'/',
140 $this->server->httpRequest =
$request;
143 <?xml version=
"1.0"?>
144 <c:free-busy-query xmlns:c=
"urn:ietf:params:xml:ns:caldav">
145 <c:time-range start=
"20111001T000000Z" end=
"20111101T000000Z" />
149 $report = $this->server->xml->parse($reportXML, null, $rootElem);
150 $this->plugin->report($rootElem, $report, null);
foreach($paths as $path) $request
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
◆ $plugin
Sabre\CalDAV\FreeBusyReportTest::$plugin |
|
protected |
◆ $server
Sabre\CalDAV\FreeBusyReportTest::$server |
|
protected |
The documentation for this class was generated from the following file: