ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilLanguageBaseTestCase.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21use PHPUnit\Framework\TestCase;
23
28abstract class ilLanguageBaseTestCase extends TestCase
29{
30 protected function setUp(): void
31 {
32 $GLOBALS['DIC'] = new Container();
33
34 parent::setUp();
35 }
36
37 protected function setGlobalVariable(string $name, $value): void
38 {
39 global $DIC;
40
41 $GLOBALS[$name] = $value;
42
43 unset($DIC[$name]);
44 $DIC[$name] = static function (Container $c) use ($name) {
45 return $GLOBALS[$name];
46 };
47 }
48}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
Class ilLanguageBaseTest.
setGlobalVariable(string $name, $value)
$c
Definition: deliver.php:25
global $DIC
Definition: shib_login.php:26
$GLOBALS["DIC"]
Definition: wac.php:54