ILIAS  release_7 Revision v7.30-3-g800a261c036
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
6use PHPUnit\Framework\TestCase;
7
12abstract 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}
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
Class ilMailBaseTest.
setGlobalVariable(string $name, $value)
$c
Definition: cli.php:37
global $DIC
Definition: goto.php:24
if($format !==null) $name
Definition: metadata.php:230