ILIAS  trunk Revision v5.2.0beta1-34132-g2d4d73d4a0
TestCase.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Tests\Refinery;
22 
26 
27 class ilLanguageMock implements Language
28 {
30  public array $requested = [];
31  public string $lang_module = 'common';
32 
33  public function __construct()
34  {
35  }
36 
37  public function txt(string $a_topic, string $a_default_lang_fallback_mod = ''): string
38  {
39  $this->requested[] = $a_topic;
40  return $a_topic;
41  }
42 
43  public function toJS($a_lang_key, ilGlobalTemplateInterface $a_tpl = null): void
44  {
45  }
46 
47  public function loadLanguageModule(string $a_module): void
48  {
49  }
50 }
51 
52 abstract class TestCase extends PHPUnitTestCase
53 {
54  public function getLanguage(): Language
55  {
56  return new ilLanguageMock();
57  }
58 }
txt(string $a_topic, string $a_default_lang_fallback_mod='')
Definition: TestCase.php:37
loadLanguageModule(string $a_module)
Definition: TestCase.php:47
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
toJS($a_lang_key, ilGlobalTemplateInterface $a_tpl=null)
Definition: TestCase.php:43