MINOR Added URLSegmentFilterTest->testReplacements()

This commit is contained in:
Ingo Schommer 2011-12-17 01:13:27 +01:00
parent 0c3af80514
commit 3f28582ee8

View File

@ -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')
);
}
}