ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilMailBaseTest.php
Go to the documentation of this file.
1 <?php declare(strict_types=1);
2 
3 /* Copyright (c) 1998-2017 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
7 
12 abstract class ilMailBaseTest extends TestCase
13 {
17  protected function setUp() : void
18  {
19  if (!defined('ANONYMOUS_USER_ID')) {
20  define('ANONYMOUS_USER_ID', 13);
21  }
22 
23  $GLOBALS['DIC'] = new Container();
24 
25  parent::setUp();
26  }
27 
32  protected function setGlobalVariable(string $name, $value) : void
33  {
34  global $DIC;
35 
36  $GLOBALS[$name] = $value;
37 
38  unset($DIC[$name]);
39  $DIC[$name] = function ($c) use ($name) {
40  return $GLOBALS[$name];
41  };
42  }
43 }
$c
Definition: cli.php:37
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:18
Class ilMailBaseTest.
if($format !==null) $name
Definition: metadata.php:230
setGlobalVariable(string $name, $value)
global $DIC
Definition: goto.php:24
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64