From 3f28582ee80b8855fb5319f0485139b2abb885a9 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sat, 17 Dec 2011 01:13:27 +0100 Subject: [PATCH] MINOR Added URLSegmentFilterTest->testReplacements() --- tests/model/URLSegmentFilterTest.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/model/URLSegmentFilterTest.php b/tests/model/URLSegmentFilterTest.php index 0d6c673a1..f99679a14 100644 --- a/tests/model/URLSegmentFilterTest.php +++ b/tests/model/URLSegmentFilterTest.php @@ -31,5 +31,22 @@ class URLSegmentFilterTest extends SapphireTest { $f->filter('Brötchen') ); } + + function testReplacements() { + $f = new URLSegmentFilter(); + $this->assertEquals( + 'tim-and-struppi', + $f->filter('Tim&Struppi') + ); + + // Customize replacements + $rs = $f->getReplacements(); + $rs['/&/u'] = '-und-'; + $f->setReplacements($rs); + $this->assertEquals( + 'tim-und-struppi', + $f->filter('Tim&Struppi') + ); + } } \ No newline at end of file