From 9459fa4826b28d3893517c3500f73aa7d636da99 Mon Sep 17 00:00:00 2001 From: Franziska Dyckhoff Date: Sun, 20 Aug 2017 13:21:47 +0200 Subject: [PATCH] add test for invalid line endings in event description --- src/Tests/Component/CalendarTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Tests/Component/CalendarTest.php b/src/Tests/Component/CalendarTest.php index 60f5926..1c92888 100644 --- a/src/Tests/Component/CalendarTest.php +++ b/src/Tests/Component/CalendarTest.php @@ -91,6 +91,18 @@ public function testSetTimezone() } + /** + * Test line endings of description + */ + public function testDescriptionLineEndings() + { + $calendar = new Calendar(); + $event = $calendar->newEvent(); + $event->setDescription("Some description\r\nwith invalid line endings."); + $this->assertEquals("Some description\nwith invalid line endings.", $event->getProperty('DESCRIPTION')); + } + + /** * Get calendar test config *