Definition at line 10 of file ICSExportPluginTest.php.
◆ setUp()
Sabre\CalDAV\ICSExportPluginTest::setUp |
( |
| ) |
|
Definition at line 16 of file ICSExportPluginTest.php.
References $id.
19 $this->icsExportPlugin =
new ICSExportPlugin();
20 $this->server->addPlugin(
21 $this->icsExportPlugin
24 $id = $this->caldavBackend->createCalendar(
28 '{DAV:}displayname' =>
'Hello!',
29 '{http://apple.com/ns/ical/}calendar-color' =>
'#AA0000FF',
33 $this->caldavBackend->createCalendarObject(
43 DTSTART;TZID=Europe/Amsterdam:20151020T000000
48 $this->caldavBackend->createCalendarObject(
if(!array_key_exists('StateId', $_REQUEST)) $id
◆ testACLIntegrationBlocked()
Sabre\CalDAV\ICSExportPluginTest::testACLIntegrationBlocked |
( |
| ) |
|
◆ testACLIntegrationNotBlocked()
Sabre\CalDAV\ICSExportPluginTest::testACLIntegrationNotBlocked |
( |
| ) |
|
Definition at line 152 of file ICSExportPluginTest.php.
References Sabre\DAVServerTest\$aclPlugin, $request, $response, Sabre\DAVServerTest\autoLogin(), Sabre\VObject\Reader\read(), Sabre\DAVServerTest\request(), and Sabre\DAV\Version\VERSION.
155 $aclPlugin->allowUnauthenticatedAccess =
false;
156 $this->server->addPlugin(
159 $this->server->addPlugin(
167 '/calendars/admin/UUID-123467?export' 171 $this->assertEquals(
'text/calendar',
$response->getHeader(
'Content-Type'));
175 $this->assertEquals(8, count($obj->children()));
176 $this->assertEquals(1, count($obj->VERSION));
177 $this->assertEquals(1, count($obj->CALSCALE));
178 $this->assertEquals(1, count($obj->PRODID));
179 $this->assertTrue(strpos((
string)$obj->PRODID, DAV\
Version::VERSION) !==
false);
180 $this->assertEquals(1, count($obj->VTIMEZONE));
181 $this->assertEquals(1, count($obj->VEVENT));
foreach($paths as $path) $request
const VERSION
Full version number.
autoLogin($userName)
This function takes a username and sets the server in a state where this user is logged in...
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
request($request, $expectedStatus=null)
Makes a request, and returns a response object.
◆ testBadEndParam()
Sabre\CalDAV\ICSExportPluginTest::testBadEndParam |
( |
| ) |
|
◆ testBadStartParam()
Sabre\CalDAV\ICSExportPluginTest::testBadStartParam |
( |
| ) |
|
◆ testBeforeMethod()
Sabre\CalDAV\ICSExportPluginTest::testBeforeMethod |
( |
| ) |
|
Definition at line 74 of file ICSExportPluginTest.php.
References $request, $response, Sabre\VObject\Reader\read(), Sabre\DAVServerTest\request(), and Sabre\DAV\Version\VERSION.
78 '/calendars/admin/UUID-123467?export' 83 $this->assertEquals(200,
$response->getStatus());
84 $this->assertEquals(
'text/calendar',
$response->getHeader(
'Content-Type'));
88 $this->assertEquals(8, count($obj->children()));
89 $this->assertEquals(1, count($obj->VERSION));
90 $this->assertEquals(1, count($obj->CALSCALE));
91 $this->assertEquals(1, count($obj->PRODID));
92 $this->assertTrue(strpos((
string)$obj->PRODID, DAV\
Version::VERSION) !==
false);
93 $this->assertEquals(1, count($obj->VTIMEZONE));
94 $this->assertEquals(1, count($obj->VEVENT));
95 $this->assertEquals(
"Hello!", $obj->{
"X-WR-CALNAME"});
96 $this->assertEquals(
"#AA0000FF", $obj->{
"X-APPLE-CALENDAR-COLOR"});
foreach($paths as $path) $request
const VERSION
Full version number.
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
request($request, $expectedStatus=null)
Makes a request, and returns a response object.
◆ testBeforeMethodNoExport()
Sabre\CalDAV\ICSExportPluginTest::testBeforeMethodNoExport |
( |
| ) |
|
◆ testBeforeMethodNoVersion()
Sabre\CalDAV\ICSExportPluginTest::testBeforeMethodNoVersion |
( |
| ) |
|
Definition at line 99 of file ICSExportPluginTest.php.
References Sabre\DAV\Server\$exposeVersion, $request, $response, Sabre\VObject\Reader\read(), Sabre\DAVServerTest\request(), and Sabre\DAV\Version\VERSION.
103 '/calendars/admin/UUID-123467?export' 109 $this->assertEquals(200,
$response->getStatus());
110 $this->assertEquals(
'text/calendar',
$response->getHeader(
'Content-Type'));
114 $this->assertEquals(8, count($obj->children()));
115 $this->assertEquals(1, count($obj->VERSION));
116 $this->assertEquals(1, count($obj->CALSCALE));
117 $this->assertEquals(1, count($obj->PRODID));
118 $this->assertFalse(strpos((
string)$obj->PRODID, DAV\
Version::VERSION) !==
false);
119 $this->assertEquals(1, count($obj->VTIMEZONE));
120 $this->assertEquals(1, count($obj->VEVENT));
foreach($paths as $path) $request
const VERSION
Full version number.
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
request($request, $expectedStatus=null)
Makes a request, and returns a response object.
◆ testContentDisposition()
Sabre\CalDAV\ICSExportPluginTest::testContentDisposition |
( |
| ) |
|
Definition at line 327 of file ICSExportPluginTest.php.
References $request, $response, and Sabre\DAVServerTest\request().
331 '/calendars/admin/UUID-123467?export' 335 $this->assertEquals(
'text/calendar',
$response->getHeader(
'Content-Type'));
337 'attachment; filename="UUID-123467-' . date(
'Y-m-d') .
'.ics"',
338 $response->getHeader(
'Content-Disposition')
foreach($paths as $path) $request
request($request, $expectedStatus=null)
Makes a request, and returns a response object.
◆ testContentDispositionBadChars()
Sabre\CalDAV\ICSExportPluginTest::testContentDispositionBadChars |
( |
| ) |
|
Definition at line 360 of file ICSExportPluginTest.php.
References $request, $response, and Sabre\DAVServerTest\request().
362 $this->caldavBackend->createCalendar(
366 '{DAV:}displayname' =>
'Test bad characters',
367 '{http://apple.com/ns/ical/}calendar-color' =>
'#AA0000FF',
373 '/calendars/admin/UUID-b_ad"(ch)ars?export',
374 [
'Accept' =>
'application/calendar+json']
378 $this->assertEquals(
'application/calendar+json',
$response->getHeader(
'Content-Type'));
380 'attachment; filename="UUID-b_adchars-' . date(
'Y-m-d') .
'.json"',
381 $response->getHeader(
'Content-Disposition')
foreach($paths as $path) $request
request($request, $expectedStatus=null)
Makes a request, and returns a response object.
◆ testContentDispositionJson()
Sabre\CalDAV\ICSExportPluginTest::testContentDispositionJson |
( |
| ) |
|
Definition at line 343 of file ICSExportPluginTest.php.
References $request, $response, and Sabre\DAVServerTest\request().
347 '/calendars/admin/UUID-123467?export',
348 [
'Accept' =>
'application/calendar+json']
352 $this->assertEquals(
'application/calendar+json',
$response->getHeader(
'Content-Type'));
354 'attachment; filename="UUID-123467-' . date(
'Y-m-d') .
'.json"',
355 $response->getHeader(
'Content-Disposition')
foreach($paths as $path) $request
request($request, $expectedStatus=null)
Makes a request, and returns a response object.
◆ testExpand()
Sabre\CalDAV\ICSExportPluginTest::testExpand |
( |
| ) |
|
Definition at line 230 of file ICSExportPluginTest.php.
References $request, $response, Sabre\VObject\Reader\read(), and Sabre\DAVServerTest\request().
234 '/calendars/admin/UUID-123467?export&start=1&end=2000000000&expand=1' 240 $this->assertEquals(0, count($obj->VTIMEZONE));
241 $this->assertEquals(1, count($obj->VEVENT));
foreach($paths as $path) $request
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
request($request, $expectedStatus=null)
Makes a request, and returns a response object.
◆ testExpandNoStart()
Sabre\CalDAV\ICSExportPluginTest::testExpandNoStart |
( |
| ) |
|
◆ testFilterComponentBadComponent()
Sabre\CalDAV\ICSExportPluginTest::testFilterComponentBadComponent |
( |
| ) |
|
◆ testFilterComponentVEVENT()
Sabre\CalDAV\ICSExportPluginTest::testFilterComponentVEVENT |
( |
| ) |
|
Definition at line 283 of file ICSExportPluginTest.php.
References $request, $response, Sabre\VObject\Reader\read(), and Sabre\DAVServerTest\request().
287 '/calendars/admin/UUID-123467?export&componentType=VEVENT' 293 $this->assertEquals(1, count($obj->VTIMEZONE));
294 $this->assertEquals(1, count($obj->VEVENT));
295 $this->assertEquals(0, count($obj->VTODO));
foreach($paths as $path) $request
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
request($request, $expectedStatus=null)
Makes a request, and returns a response object.
◆ testFilterComponentVTODO()
Sabre\CalDAV\ICSExportPluginTest::testFilterComponentVTODO |
( |
| ) |
|
Definition at line 299 of file ICSExportPluginTest.php.
References $request, $response, Sabre\VObject\Reader\read(), and Sabre\DAVServerTest\request().
303 '/calendars/admin/UUID-123467?export&componentType=VTODO' 310 $this->assertEquals(0, count($obj->VTIMEZONE));
311 $this->assertEquals(0, count($obj->VEVENT));
312 $this->assertEquals(1, count($obj->VTODO));
foreach($paths as $path) $request
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
request($request, $expectedStatus=null)
Makes a request, and returns a response object.
◆ testFilterStartEnd()
Sabre\CalDAV\ICSExportPluginTest::testFilterStartEnd |
( |
| ) |
|
Definition at line 205 of file ICSExportPluginTest.php.
References $request, $response, Sabre\VObject\Reader\read(), and Sabre\DAVServerTest\request().
209 '/calendars/admin/UUID-123467?export&start=1&end=2' 215 $this->assertEquals(0, count($obj->VTIMEZONE));
216 $this->assertEquals(0, count($obj->VEVENT));
foreach($paths as $path) $request
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
request($request, $expectedStatus=null)
Makes a request, and returns a response object.
◆ testInit()
Sabre\CalDAV\ICSExportPluginTest::testInit |
( |
| ) |
|
Definition at line 63 of file ICSExportPluginTest.php.
66 $this->icsExportPlugin,
67 $this->server->getPlugin(
'ics-export')
69 $this->assertEquals($this->icsExportPlugin, $this->server->getPlugin(
'ics-export'));
70 $this->assertEquals(
'ics-export', $this->icsExportPlugin->getPluginInfo()[
'name']);
◆ testJCal()
Sabre\CalDAV\ICSExportPluginTest::testJCal |
( |
| ) |
|
Definition at line 245 of file ICSExportPluginTest.php.
References $request, $response, and Sabre\DAVServerTest\request().
249 '/calendars/admin/UUID-123467?export',
250 [
'Accept' =>
'application/calendar+json']
254 $this->assertEquals(
'application/calendar+json',
$response->getHeader(
'Content-Type'));
foreach($paths as $path) $request
request($request, $expectedStatus=null)
Makes a request, and returns a response object.
◆ testJCalInUrl()
Sabre\CalDAV\ICSExportPluginTest::testJCalInUrl |
( |
| ) |
|
◆ testNegotiateDefault()
Sabre\CalDAV\ICSExportPluginTest::testNegotiateDefault |
( |
| ) |
|
◆ $icsExportPlugin
Sabre\CalDAV\ICSExportPluginTest::$icsExportPlugin |
|
protected |
◆ $setupCalDAV
Sabre\CalDAV\ICSExportPluginTest::$setupCalDAV = true |
|
protected |
The documentation for this class was generated from the following file: