mirror of
https://github.com/e107inc/e107.git
synced 2025-03-28 08:12:42 +01:00
Merge branch 'check_is_utf8_fill_phrases_array' of https://github.com/SimSync/e107-test into SimSync-check_is_utf8_fill_phrases_array
This commit is contained in:
commit
2f10ffbc8e
@ -41,12 +41,34 @@
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
public function testFill_phrases_array()
|
||||
{
|
||||
|
||||
$strings =
|
||||
'define("LAN1", "Főadminisztrátor");'."\n".
|
||||
'define("LAN2", "Hői");'."\n".
|
||||
'define("LAN3", "Rendszerinformáció");'."\n".
|
||||
'define("LAN4", "Felhasználó");'."\n".
|
||||
'define("LAN5", "Regisztrált felhasználó");';
|
||||
|
||||
$expected = array (
|
||||
'orig' =>
|
||||
array (
|
||||
'LAN1' => 'Főadminisztrátor',
|
||||
'LAN2' => 'Hői',
|
||||
'LAN3' => 'Rendszerinformáció',
|
||||
'LAN4' => 'Felhasználó',
|
||||
'LAN5' => 'Regisztrált felhasználó',
|
||||
),
|
||||
);
|
||||
|
||||
$actual = $this->lan->fill_phrases_array($strings, 'orig');
|
||||
$this->assertEquals($expected, $actual, 'fill_phrases_array() failed.');
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
public function testThirdPartyPlugins()
|
||||
{
|
||||
|
||||
@ -79,7 +101,20 @@
|
||||
*/
|
||||
public function testIs_utf8()
|
||||
{
|
||||
// @todo please use multiple assertions in here rather than multiple methods.
|
||||
$strings = array(
|
||||
"Főadminisztrátor",
|
||||
"Hői",
|
||||
"Rendszerinformáció",
|
||||
"Felhasználó",
|
||||
"Regisztrált felhasználó");
|
||||
|
||||
foreach($strings as $expected)
|
||||
{
|
||||
$actual = $this->lan->is_utf8($expected);
|
||||
$this->assertEquals(true, $actual, 'is_utf8() failed on '.$expected.'.');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user