From 64b962a6ae4314672199195a45540b7f35d45bd2 Mon Sep 17 00:00:00 2001 From: Franziska Dyckhoff Date: Sun, 20 Aug 2017 12:22:40 +0200 Subject: [PATCH] test utf-8 encoding tests #4 --- src/Tests/Response/CalendarResponseTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Tests/Response/CalendarResponseTest.php b/src/Tests/Response/CalendarResponseTest.php index 5e502a0..81dbfbd 100644 --- a/src/Tests/Response/CalendarResponseTest.php +++ b/src/Tests/Response/CalendarResponseTest.php @@ -39,4 +39,20 @@ public function testCalendarResponse(Calendar $calendar, $headers = array()) $this->assertContains($calendar->getContentType(), $response->headers->get('Content-Type')); $this->assertContains($calendar->getConfig('filename'), $response->headers->get('Content-Disposition')); } + + + /** + * Testing UTF-8 encoding + */ + public function testUTF8Encoding() + { + $calendar = new Calendar(array('format' => 'ical')); + $event = $calendar->newEvent(); + $event->setDtstart('2017/01/01 9:00:00'); + $event->setDtend('2017/01/01 10:00:00'); + $event->setSummary('Some event with special chars like ÄÖÜß'); + + $response = new CalendarResponse($calendar); + $this->assertContains('ÄÖÜß', $response->getContent()); + } }