Page MenuHomePhabricator

BrokerProcessMessageTest.php
No OneTemporary

BrokerProcessMessageTest.php

<?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

Mime Type
text/x-php
Expires
Sun, Dec 22, 12:03 PM (3 d, 7 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
916484
Default Alt Text
BrokerProcessMessageTest.php (2 KB)

Event Timeline