ILIAS  trunk Revision v11.0_alpha-1731-gff9cd7e2bd3
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilLogComponentLevelTest Class Reference

Unit tests for class ilDidacticTemplate. More...

+ Inheritance diagram for ilLogComponentLevelTest:
+ Collaboration diagram for ilLogComponentLevelTest:

Public Member Functions

 testLevel ()
 

Protected Member Functions

 setUp ()
 
 setGlobalVariable (string $name, $value)
 
 initDependencies ()
 

Protected Attributes

Container $dic
 

Detailed Description

Unit tests for class ilDidacticTemplate.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 29 of file ilLogComponentLevelTest.php.

Member Function Documentation

◆ initDependencies()

ilLogComponentLevelTest::initDependencies ( )
protected

Definition at line 61 of file ilLogComponentLevelTest.php.

References $dic, $GLOBALS, and setGlobalVariable().

Referenced by setUp().

61  : void
62  {
63  $this->dic = new Container();
64  $GLOBALS['DIC'] = $this->dic;
65  $this->setGlobalVariable('ilDB', $this->createMock(ilDBInterface::class));
66  }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
$GLOBALS["DIC"]
Definition: wac.php:53
setGlobalVariable(string $name, $value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setGlobalVariable()

ilLogComponentLevelTest::setGlobalVariable ( string  $name,
  $value 
)
protected

Definition at line 50 of file ilLogComponentLevelTest.php.

References $c, $DIC, and $GLOBALS.

Referenced by initDependencies().

50  : void
51  {
52  global $DIC;
53 
54  $GLOBALS[$name] = $value;
55  unset($DIC[$name]);
56  $DIC[$name] = static function (\ILIAS\DI\Container $c) use ($value) {
57  return $value;
58  };
59  }
$c
Definition: deliver.php:25
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
$GLOBALS["DIC"]
Definition: wac.php:53
global $DIC
Definition: shib_login.php:22
+ Here is the caller graph for this function:

◆ setUp()

ilLogComponentLevelTest::setUp ( )
protected

Definition at line 33 of file ilLogComponentLevelTest.php.

References initDependencies().

33  : void
34  {
35  $this->initDependencies();
36  parent::setUp();
37  }
+ Here is the call graph for this function:

◆ testLevel()

ilLogComponentLevelTest::testLevel ( )

Definition at line 39 of file ilLogComponentLevelTest.php.

References ilLogLevel\CRITICAL.

39  : void
40  {
41  $component_level = new ilLogComponentLevel(
42  'log',
44  );
45  $this->assertEquals('log', $component_level->getComponentId());
46  $this->assertEquals(ilLogLevel::CRITICAL, $component_level->getLevel());
47  }
individual log levels for components

Field Documentation

◆ $dic

Container ilLogComponentLevelTest::$dic
protected

Definition at line 31 of file ilLogComponentLevelTest.php.

Referenced by initDependencies().


The documentation for this class was generated from the following file: