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