ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ilLanguageBaseTestCase.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
24 
29 abstract class ilLanguageBaseTestCase extends TestCase
30 {
31  protected function setUp(): void
32  {
33  $GLOBALS['DIC'] = new Container();
34 
35  parent::setUp();
36  }
37 
38  protected function setGlobalVariable(string $name, $value): void
39  {
40  global $DIC;
41 
42  $GLOBALS[$name] = $value;
43 
44  unset($DIC[$name]);
45  $DIC[$name] = static function (Container $c) use ($name) {
46  return $GLOBALS[$name];
47  };
48  }
49 }
$c
Definition: deliver.php:9
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
$GLOBALS["DIC"]
Definition: wac.php:30
Class ilLanguageBaseTest.
global $DIC
Definition: shib_login.php:25
setGlobalVariable(string $name, $value)