mirror of
https://github.com/e107inc/e107.git
synced 2025-04-21 21:21:54 +02:00
Issue #4101 toASCII characters added and test added to confirm.
This commit is contained in:
parent
df764389a8
commit
0dbad5d72b
@ -2182,7 +2182,9 @@ class e_parse extends e_parser
|
||||
'Ā' => 'A', 'Č' => 'C', 'Ē' => 'E', 'Ģ' => 'G', 'Ī' => 'i', 'Ķ' => 'k', 'Ļ' => 'L', 'Ņ' => 'N',
|
||||
'Š' => 'S', 'Ū' => 'u', 'Ž' => 'Z',
|
||||
'ā' => 'a', 'č' => 'c', 'ē' => 'e', 'ģ' => 'g', 'ī' => 'i', 'ķ' => 'k', 'ļ' => 'l', 'ņ' => 'n',
|
||||
'š' => 's', 'ū' => 'u', 'ž' => 'z'
|
||||
'š' => 's', 'ū' => 'u', 'ž' => 'z',
|
||||
|
||||
'ľ' => 'l', 'ŕ'=>'r',
|
||||
);
|
||||
|
||||
return str_replace(array_keys($char_map), $char_map, $text);
|
||||
|
@ -185,12 +185,24 @@ TMP;
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
public function testToASCII()
|
||||
{
|
||||
|
||||
}
|
||||
$array = array(
|
||||
array('input' => 'ľ, ú, ŕ, ô, ť', 'expected' => 'l, u, r, o, t'),
|
||||
);
|
||||
|
||||
foreach($array as $arr)
|
||||
{
|
||||
$result = $this->tp->toASCII($arr['input']);
|
||||
$this->assertEquals($arr['expected'], $result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
/*
|
||||
public function testToNumber()
|
||||
{
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user