Files
Heimdall/tests/Unit/database/seeders/SettingsSeederTest.php
Attila Kerekes edb51e56f1 feat: Dynamically add all languages to db
Add unit test to find missing translations
2022-11-14 19:31:07 +01:00

24 lines
637 B
PHP

<?php
namespace Tests\Unit\database\seeders;
use Database\Seeders\SettingsSeeder;
use Tests\TestCase;
class SettingsSeederTest extends TestCase
{
/**
* All language keys are defined in all languages based on the en language file.
*
* @return void
*/
public function testReturnsAJSONMapWithSameAmountOfItemsAsLanguageDirectoriesPresent()
{
$languageDirectories = array_filter(glob(resource_path().'/lang/*'), 'is_dir');
$languageMap = json_decode(SettingsSeeder::getSupportedLanguageMap(), true);
$this->assertTrue(count($languageMap) === count($languageDirectories));
}
}