Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1820751
BrokerProcessMessageTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Size
2 KB
Subscribers
None
BrokerProcessMessageTest.php
View Options
<?php
namespace
Sabre\VObject\ITip
;
class
BrokerProcessMessageTest
extends
BrokerTester
{
function
testRequestNew
()
{
$itip
=
<<<ICS
BEGIN:VCALENDAR
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
SEQUENCE:1
UID:foobar
END:VEVENT
END:VCALENDAR
ICS;
$expected
=
<<<ICS
BEGIN:VCALENDAR
%foo%
BEGIN:VEVENT
SEQUENCE:1
UID:foobar
END:VEVENT
END:VCALENDAR
ICS;
$result
=
$this
->
process
(
$itip
,
null
,
$expected
);
}
function
testRequestUpdate
()
{
$itip
=
<<<ICS
BEGIN:VCALENDAR
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
SEQUENCE:2
UID:foobar
END:VEVENT
END:VCALENDAR
ICS;
$old
=
<<<ICS
BEGIN:VCALENDAR
%foo%
BEGIN:VEVENT
SEQUENCE:1
UID:foobar
END:VEVENT
END:VCALENDAR
ICS;
$expected
=
<<<ICS
BEGIN:VCALENDAR
%foo%
BEGIN:VEVENT
SEQUENCE:2
UID:foobar
END:VEVENT
END:VCALENDAR
ICS;
$result
=
$this
->
process
(
$itip
,
$old
,
$expected
);
}
function
testCancel
()
{
$itip
=
<<<ICS
BEGIN:VCALENDAR
VERSION:2.0
METHOD:CANCEL
BEGIN:VEVENT
SEQUENCE:2
UID:foobar
END:VEVENT
END:VCALENDAR
ICS;
$old
=
<<<ICS
BEGIN:VCALENDAR
%foo%
BEGIN:VEVENT
SEQUENCE:1
UID:foobar
END:VEVENT
END:VCALENDAR
ICS;
$expected
=
<<<ICS
BEGIN:VCALENDAR
%foo%
BEGIN:VEVENT
SEQUENCE:2
UID:foobar
STATUS:CANCELLED
END:VEVENT
END:VCALENDAR
ICS;
$result
=
$this
->
process
(
$itip
,
$old
,
$expected
);
}
function
testCancelNoExistingEvent
()
{
$itip
=
<<<ICS
BEGIN:VCALENDAR
VERSION:2.0
METHOD:CANCEL
BEGIN:VEVENT
SEQUENCE:2
UID:foobar
END:VEVENT
END:VCALENDAR
ICS;
$old
=
null
;
$expected
=
null
;
$result
=
$this
->
process
(
$itip
,
$old
,
$expected
);
}
function
testUnsupportedComponent
()
{
$itip
=
<<<ICS
BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VTODO
SEQUENCE:2
UID:foobar
END:VTODO
END:VCALENDAR
ICS;
$old
=
null
;
$expected
=
null
;
$result
=
$this
->
process
(
$itip
,
$old
,
$expected
);
}
function
testUnsupportedMethod
()
{
$itip
=
<<<ICS
BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
BEGIN:VEVENT
SEQUENCE:2
UID:foobar
END:VEVENT
END:VCALENDAR
ICS;
$old
=
null
;
$expected
=
null
;
$result
=
$this
->
process
(
$itip
,
$old
,
$expected
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Dec 22, 12:03 PM (3 d, 19 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
916484
Default Alt Text
BrokerProcessMessageTest.php (2 KB)
Attached To
rDAVCAL DokuWiki DAVCal PlugIn
Event Timeline
Log In to Comment