ILIAS  release_7 Revision v7.30-3-g800a261c036
ilBuddySystemBaseTest.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2
3/* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */
4
6use PHPUnit\Framework\TestCase;
7
12class ilBuddySystemBaseTest extends TestCase
13{
18 protected function setGlobalVariable(string $name, $value) : void
19 {
20 global $DIC;
21
22 if (!$DIC) {
23 $DIC = new Container();
24 }
25
26 $GLOBALS[$name] = $value;
27
28 unset($DIC[$name]);
29 $DIC[$name] = function ($c) use ($name) {
30 return $GLOBALS[$name];
31 };
32 }
33}
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
An exception for terminatinating execution or to throw for unit testing.
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:19
setGlobalVariable(string $name, $value)
$c
Definition: cli.php:37
global $DIC
Definition: goto.php:24
if($format !==null) $name
Definition: metadata.php:230