mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Added URLSegmentFilterTest->testReplacements()
This commit is contained in:
parent
0c3af80514
commit
3f28582ee8
@ -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')
|
||||
);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user