Skip to content

Commit 9459fa4

Browse files
committed
add test for invalid line endings in event description
1 parent fce2c3c commit 9459fa4

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
@@ -91,6 +91,18 @@ public function testSetTimezone()
9191
}
9292

9393

94+
/**
95+
* Test line endings of description
96+
*/
97+
public function testDescriptionLineEndings()
98+
{
99+
$calendar = new Calendar();
100+
$event = $calendar->newEvent();
101+
$event->setDescription("Some description\r\nwith invalid line endings.");
102+
$this->assertEquals("Some description\nwith invalid line endings.", $event->getProperty('DESCRIPTION'));
103+
}
104+
105+
94106
/**
95107
* Get calendar test config
96108
*

0 commit comments

Comments
 (0)