Permalink
Browse files

MINOR Added URLSegmentFilterTest->testReplacements()

  • Loading branch information...
chillu committed Dec 17, 2011
1 parent 0c3af80 commit 3f28582ee80b8855fb5319f0485139b2abb885a9
Showing with 17 additions and 0 deletions.
  1. +17 −0 tests/model/URLSegmentFilterTest.php
@@ -31,5 +31,22 @@ function testRetainsNonAsciiUrlsWithAllowMultiByteOption() {
$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')
+ );
+ }
}

0 comments on commit 3f28582

Please sign in to comment.