Skip to content

Commit

Permalink
Add additional (passing) test.
Browse files Browse the repository at this point in the history
Related to Bug: 14132
  • Loading branch information
mrubinsk committed Dec 2, 2015
1 parent c36fec1 commit 94273fb
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 2 deletions.
6 changes: 4 additions & 2 deletions framework/Icalendar/package.xml
Expand Up @@ -23,7 +23,7 @@
<email>mrubinsk@horde.org</email>
<active>yes</active>
</developer>
<date>2015-11-17</date>
<date>2015-12-02</date>
<version>
<release>2.1.3</release>
<api>2.1.0</api>
Expand Down Expand Up @@ -377,6 +377,7 @@
</dir> <!-- /test/Horde/Icalendar/fixtures/vTimezone -->
<file name="bug7423.ics" role="test" />
<file name="bug14132.ics" role="test" />
<file name="bug14132_2.ics" role="test" />
<file name="bug14153.ics" role="test" />
<file name="charset1.ics" role="test" />
<file name="charset2.ics" role="test" />
Expand Down Expand Up @@ -600,6 +601,7 @@
<install as="Horde/Icalendar/TimezonesTest.php" name="test/Horde/Icalendar/TimezonesTest.php" />
<install as="Horde/Icalendar/fixtures/bug7423.ics" name="test/Horde/Icalendar/fixtures/bug7423.ics" />
<install as="Horde/Icalendar/fixtures/bug14132.ics" name="test/Horde/Icalendar/fixtures/bug14132.ics" />
<install as="Horde/Icalendar/fixtures/bug14132_2.ics" name="test/Horde/Icalendar/fixtures/bug14132_2.ics" />
<install as="Horde/Icalendar/fixtures/bug14153.ics" name="test/Horde/Icalendar/fixtures/bug14153.ics" />
<install as="Horde/Icalendar/fixtures/charset1.ics" name="test/Horde/Icalendar/fixtures/charset1.ics" />
<install as="Horde/Icalendar/fixtures/charset2.ics" name="test/Horde/Icalendar/fixtures/charset2.ics" />
Expand Down Expand Up @@ -1216,7 +1218,7 @@ Lots of improvements, bugfixes and support for more fields and members of the iC
<stability>
<release>stable</release>
<api>stable</api></stability>
<date>2015-11-17</date>
<date>2015-12-02</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
Expand Down
11 changes: 11 additions & 0 deletions framework/Icalendar/test/Horde/Icalendar/ParseTest.php
Expand Up @@ -385,4 +385,15 @@ public function testBug14132()
$this->assertEquals((string)$dtstart, '2015-10-09 03:00:00');
}

public function testBug14132_2()
{
$ical = new Horde_Icalendar();
$ical->parsevCalendar(file_get_contents(__DIR__ . '/fixtures/bug14132_2.ics'));
$params = $ical->getComponent(1)->getAttribute('DTSTART', true);
$tz = $params[0]['TZID'];
$start = $ical->getComponent(1)->getAttribute('DTSTART');
$dtstart = new Horde_Date($start, $tz);
$this->assertEquals((string)$dtstart, '2015-10-09 03:00:00');
}

}
46 changes: 46 additions & 0 deletions framework/Icalendar/test/Horde/Icalendar/fixtures/bug14132_2.ics
@@ -0,0 +1,46 @@
BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:Microsoft Exchange Server 2007
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Eastern Standard Time
BEGIN:STANDARD
DTSTART:20010101T020000
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=11
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20010101T020000
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=2SU;BYMONTH=3
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DESCRIPTION;LANGUAGE=de-DE:test
SUMMARY;LANGUAGE=de-DE:test
DTSTART;TZID=Eastern Standard Time:20151009T030000
DTEND;TZID=Eastern Standard Time:20151009T033000
UID:040000008200E00074C5B7101A82E0080000000040F4DEBF64F0D001000000000000000
010000000A1F2AAD0A2CAF64C9C9CE7B21CC9DA79
CLASS:PUBLIC
PRIORITY:5
DTSTAMP:20150924T070916Z
TRANSP:OPAQUE
STATUS:CONFIRMED
SEQUENCE:2
X-MICROSOFT-CDO-APPT-SEQUENCE:2
X-MICROSOFT-CDO-OWNERAPPTID:963680223
X-MICROSOFT-CDO-BUSYSTATUS:TENTATIVE
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-INSTTYPE:0
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:REMINDER
TRIGGER;RELATED=START:-PT15M
END:VALARM
END:VEVENT
END:VCALENDAR

0 comments on commit 94273fb

Please sign in to comment.