ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilWorkflowEngineBaseTest.php
Go to the documentation of this file.
1<?php
2
7{
12 protected function setGlobalVariable($name, $value)
13 {
14 global $DIC;
15
16 $GLOBALS[$name] = $value;
17
18 unset($DIC[$name]);
19 $DIC[$name] = function ($c) use ($name) {
20 return $GLOBALS[$name];
21 };
22 }
23
27 protected function setUp()
28 {
29 parent::setUp();
30
31 $this->setGlobalVariable('ilDB', $this->getMockBuilder('ilDBInterface')->getMock());
32
33 $this->setGlobalVariable(
34 'ilAppEventHandler',
35 $this->getMockBuilder('ilAppEventHandler')->disableOriginalConstructor()->setMethods(array('raise'))->getMock()
36 );
37
38 $this->setGlobalVariable(
39 'ilSetting',
40 $this->getMockBuilder('ilSetting')->disableOriginalConstructor()->setMethods(array('delete', 'get', 'set'))->getMock()
41 );
42 }
43}
An exception for terminatinating execution or to throw for unit testing.
Class ilWorkflowEngineBaseTest.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
if($format !==null) $name
Definition: metadata.php:146
global $DIC
Definition: saml.php:7