Mercurial > hg > rc1
view vendor/sabre/vobject/tests/VObject/ITip/BrokerProcessMessageTest.php @ 38:ac106d4c8961 default tip
flip /etc/roundcube to point here
author | Charlie Root |
---|---|
date | Sat, 29 Dec 2018 05:39:53 -0500 |
parents | 430dbd5346f7 |
children |
line wrap: on
line source
<?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); } }