mirror of
https://github.com/gtbu/Typesetter-5.3-p8.git
synced 2024-11-10 17:34:02 +01:00
27 lines
553 B
PHP
27 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));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|