mirror of
https://github.com/gtbu/Typesetter-5.3-p8.git
synced 2024-11-25 07:39:13 +01:00
28 lines
553 B
PHP
28 lines
553 B
PHP
|
<?php
|
||
|
|
||
|
|
||
|
class phpunit_Languages extends gptest_bootstrap{
|
||
|
|
||
|
function testKeys(){
|
||
|
global $langmessage, $languages;
|
||
|
|
||
|
//get en language
|
||
|
\gp\tool::GetLangFile('main.inc','en');
|
||
|
$keys_en = array_keys($langmessage);
|
||
|
|
||
|
//compare keys in other languages
|
||
|
foreach($languages as $code => $lang){
|
||
|
$langmessage = array();
|
||
|
\gp\tool::GetLangFile('main.inc',$code);
|
||
|
$keys = array_keys($langmessage);
|
||
|
|
||
|
|
||
|
$diff = array_diff($keys_en,$keys);
|
||
|
self::assertEmpty($diff,'Keys missing in '.$lang.' ('.$code.') language file: '.pre($diff));
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|