ILIAS  release_8 Revision v8.24
ilSetupLanguageTest.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
28{
31
35 private array $langInstalled;
36
37 protected function setUp(): void
38 {
39 $this->newLangSetupDe = new ilSetupLanguage('de');
40 $this->newLangSetupEs = new ilSetupLanguage('es');
41
42 $this->langInstalled[] = $this->newLangSetupDe;
43 $this->langInstalled[] = $this->newLangSetupEs;
44 }
45
46 public function testRetrieveLanguageKey(): void
47 {
48 $this->assertEquals('de', $this->newLangSetupDe->getLangKey());
49 $this->assertEquals('es', $this->newLangSetupEs->getLangKey());
50 }
51
52 public function testRetrieveInstalledLanguage(): void
53 {
54 $languagesAsKeys = [];
55 foreach ($this->langInstalled as $languageAsKey) {
56 $languagesAsKeys[] = $languageAsKey->getLangKey();
57 }
58
59 $this->assertContains('de', $languagesAsKeys);
60 $this->assertContains('es', $languagesAsKeys);
61 }
62}
Class ilLanguageBaseTest.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilSetupLanguage $newLangSetupEs
ilSetupLanguage $newLangSetupDe
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...