Skip to content

Commit

Permalink
test utf-8 encoding
Browse files Browse the repository at this point in the history
tests #4
  • Loading branch information
fdyckhoff committed Aug 20, 2017
1 parent 9b3ff8c commit 64b962a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Tests/Response/CalendarResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

0 comments on commit 64b962a

Please sign in to comment.