[ Index ] |
PHP Cross Reference of DokuWiki |
[Summary view] [Print] [Text view]
1 <?php 2 3 class utf8_stripspecials extends DokuWikiTest 4 { 5 6 /** 7 * @return array 8 * @see testGivens 9 */ 10 function provideGivens() 11 { 12 return [ 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 23 ]; 24 } 25 26 /** 27 * @param string $string 28 * @param string $replacement 29 * @param string $additional 30 * @param string $expected 31 * @dataProvider provideGivens 32 */ 33 function testGivens($string, $replacement, $additional, $expected) 34 { 35 $this->assertEquals($expected, \dokuwiki\Utf8\Clean::stripspecials($string, $replacement, $additional)); 36 } 37 38 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body