[Pkg-owncloud-commits] [php-sabre-vobject] 121/341: Add tests for 3.6.4 and 3.6.5 of RFC6321.
David Prévot
taffit at moszumanska.debian.org
Tue Aug 11 13:35:40 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabre-vobject.
commit 46ef57ceab8cb26fa89552da9a4dfb45fe1519e4
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date: Wed Jan 14 15:44:17 2015 +0100
Add tests for 3.6.4 and 3.6.5 of RFC6321.
---
tests/VObject/Parser/XmlTest.php | 52 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/tests/VObject/Parser/XmlTest.php b/tests/VObject/Parser/XmlTest.php
index 8f13de6..b5cff97 100644
--- a/tests/VObject/Parser/XmlTest.php
+++ b/tests/VObject/Parser/XmlTest.php
@@ -552,6 +552,58 @@ XML
}
+ /**
+ * Values, Date.
+ */
+ function testRFC6321Section3_6_4() {
+
+ $this->assertXCalEqualsToICal(
+<<<XML
+<?xml version="1.0" encoding="utf-8"?>
+ <icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
+ <vcalendar>
+ <properties>
+ <dtstart>
+ <date>2011-05-17</date>
+ </dtstart>
+ </properties>
+ </vcalendar>
+ </icalendar>
+XML
+,
+ 'BEGIN:VCALENDAR' . CRLF .
+ 'DTSTART;VALUE=DATE:20110517' . CRLF .
+ 'END:VCALENDAR' . CRLF
+ );
+
+ }
+
+ /**
+ * Values, Date-Time.
+ */
+ function testRFC6321Section3_6_5() {
+
+ $this->assertXCalEqualsToICal(
+<<<XML
+<?xml version="1.0" encoding="utf-8"?>
+ <icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
+ <vcalendar>
+ <properties>
+ <dtstart>
+ <date-time>2011-05-17T12:00:00</date-time>
+ </dtstart>
+ </properties>
+ </vcalendar>
+ </icalendar>
+XML
+,
+ 'BEGIN:VCALENDAR' . CRLF .
+ 'DTSTART:20110517T120000' . CRLF .
+ 'END:VCALENDAR' . CRLF
+ );
+
+ }
+
protected function assertXCalEqualsToICal($xcal, $ical) {
$component = VObject\Reader::readXML($xcal);
--
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