3 class utf8_stripspecials
extends DokuWikiTest
10 function provideGivens()
13 ['asciistring', '', '', 'asciistring'],
14 ['asciistring', '', '\._\-:', 'asciistring'],
15 ['ascii.string', '', '\._\-:', 'asciistring'],
16 ['ascii.string', ' ', '\._\-:', 'ascii string'],
17 ['2.1.14', ' ', '\._\-:', '2 1 14'],
18 ['ascii.string', '', '\._\-:\*', 'asciistring'],
19 ['ascii.string', ' ', '\._\-:\*', 'ascii string'],
20 ['2.1.14', ' ', '\._\-:\*', '2 1 14'],
21 ['string with nbsps', '_', '\*', 'string_with_nbsps'],
22 ['αβγδεϝϛζηθικλμνξοπϟϙρστυφχψωϡ', '_', '', 'αβγδεϝϛζηθικλμνξοπϟϙρστυφχψωϡ'], // #3188
27 * @param string $string
28 * @param string $replacement
29 * @param string $additional
30 * @param string $expected
31 * @dataProvider provideGivens
33 function testGivens($string, $replacement, $additional, $expected)
35 $this->assertEquals($expected, \dokuwiki\Utf8\Clean
::stripspecials($string, $replacement, $additional));