[Pkg-owncloud-commits] [php-sabre-vobject] 36/38: Unittests
David Prévot
taffit at moszumanska.debian.org
Tue Sep 23 03:10:24 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch upstream
in repository php-sabre-vobject.
commit 814003afe537b10b7852fe9500ad5684b2e972b4
Author: Evert Pot <evert at rooftopsolutions.nl>
Date: Fri Sep 19 19:50:28 2014 +0100
Unittests
---
tests/VObject/ITip/BrokerNewEventTest.php | 66 ++++++++++++++++++++++++++++++-
1 file changed, 65 insertions(+), 1 deletion(-)
diff --git a/tests/VObject/ITip/BrokerNewEventTest.php b/tests/VObject/ITip/BrokerNewEventTest.php
index d653996..574bb78 100644
--- a/tests/VObject/ITip/BrokerNewEventTest.php
+++ b/tests/VObject/ITip/BrokerNewEventTest.php
@@ -255,7 +255,7 @@ ICS
function testRecurrenceInvite2() {
- // This method tests a nearly identical path, but in this case the
+ // This method tests a nearly identical path, but in this case the
// master event does not have an EXDATE.
$message = <<<ICS
BEGIN:VCALENDAR
@@ -396,6 +396,70 @@ ICS;
}
+ /**
+ * @expectedException Sabre\VObject\ITip\ITipException
+ */
+ function testMultipleUID() {
+
+ $message = <<<ICS
+BEGIN:VCALENDAR
+VERSION:2.0
+BEGIN:VEVENT
+UID:foobar
+ORGANIZER;CN=Strunk:mailto:strunk at example.org
+ATTENDEE;CN=One:mailto:one at example.org
+ATTENDEE;CN=Two:mailto:two at example.org
+DTSTART:20140716T120000Z
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:VEVENT
+UID:foobar2
+RECURRENCE-ID:20140718T120000Z
+ORGANIZER;CN=Strunk:mailto:strunk at example.org
+ATTENDEE;CN=Two:mailto:two at example.org
+ATTENDEE;CN=Three:mailto:three at example.org
+DTSTART:20140718T120000Z
+END:VEVENT
+END:VCALENDAR
+ICS;
+
+ $version = \Sabre\VObject\Version::VERSION;
+ $result = $this->parse($message, array());
+
+ }
+
+ /**
+ * @expectedException Sabre\VObject\ITip\SameOrganizerForAllComponentsException
+ *
+ */
+ function testChangingOrganizers() {
+
+ $message = <<<ICS
+BEGIN:VCALENDAR
+VERSION:2.0
+BEGIN:VEVENT
+UID:foobar
+ORGANIZER;CN=Strunk:mailto:strunk at example.org
+ATTENDEE;CN=One:mailto:one at example.org
+ATTENDEE;CN=Two:mailto:two at example.org
+DTSTART:20140716T120000Z
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:VEVENT
+UID:foobar
+RECURRENCE-ID:20140718T120000Z
+ORGANIZER;CN=Strunk:mailto:ew at example.org
+ATTENDEE;CN=Two:mailto:two at example.org
+ATTENDEE;CN=Three:mailto:three at example.org
+DTSTART:20140718T120000Z
+END:VEVENT
+END:VCALENDAR
+ICS;
+
+ $version = \Sabre\VObject\Version::VERSION;
+ $result = $this->parse($message, array());
+
+ }
function parse($message, $expected = array()) {
$broker = new Broker();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git
More information about the Pkg-owncloud-commits
mailing list