Skip to content

Commit 2959e29

Browse files
committed
add test for invalid line endings in event description
1 parent 64b962a commit 2959e29

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/Tests/Component/CalendarTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,18 @@ public function testSetTimezone()
8585
}
8686

8787

88+
/**
89+
* Test line endings of description
90+
*/
91+
public function testDescriptionLineEndings()
92+
{
93+
$calendar = new Calendar();
94+
$event = $calendar->newEvent();
95+
$event->setDescription("Some description\r\nwith invalid line endings.");
96+
$this->assertEquals("Some description\nwith invalid line endings.", $event->getProperty('DESCRIPTION'));
97+
}
98+
99+
88100
/**
89101
* Get calendar test config
90102
*

0 commit comments

Comments
 (0)