From cf8e9f2427df0b8b93af40781873b8c4839dbeea Mon Sep 17 00:00:00 2001 From: Jarkko Linnanvirta Date: Thu, 21 Jan 2016 12:57:50 +0200 Subject: [PATCH] Test removing some bad characters when multibyte is allowed --- tests/model/URLSegmentFilterTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/model/URLSegmentFilterTest.php b/tests/model/URLSegmentFilterTest.php index 433e73469..a15b6f776 100644 --- a/tests/model/URLSegmentFilterTest.php +++ b/tests/model/URLSegmentFilterTest.php @@ -95,5 +95,11 @@ class URLSegmentFilterTest extends SapphireTest { $filter = new URLSegmentFilter(); $this->assertEquals('url-has-trailing-dashes', $filter->filter('url-has-trailing-dashes--')); } + + public function testRemovesBadCharactersWithMultibyteAllowed() { + $filter = new URLSegmentFilter(); + $filter->setAllowMultibyte(true); + $this->assertEquals('url-with-bad-characters', $filter->filter('url?-with/-bad#-characters=')); + } }