3 declare(strict_types=1);
12 protected function setUp(): void
21 $this->assertTrue($tree instanceof
ilTree);
29 $tree->initLangCode();
30 $tree_reflection =
new ReflectionProperty($tree,
'lang_code');
31 $tree_reflection->setAccessible(
true);
32 $this->assertEquals(
'en', $tree_reflection->getValue($tree));
37 $user = $this->getMockBuilder(ilObjUser::class)
38 ->disableOriginalConstructor()
39 ->onlyMethods([
'getCurrentLanguage'])
41 $user->method(
'getCurrentLanguage')->willReturn(
'');
43 $tree->initLangCode();
44 $tree_reflection =
new ReflectionProperty($tree,
'lang_code');
45 $tree_reflection->setAccessible(
true);
46 $this->assertEquals(
'en', $tree_reflection->getValue($tree));
70 $this->
setGlobalVariable(
'ilAppEventHandler', $this->createMock(ilAppEventHandler::class));
72 $logger = $this->getMockBuilder(ilLogger::class)
73 ->disableOriginalConstructor()
76 $logger_factory = $this->getMockBuilder(ilLoggerFactory::class)
77 ->disableOriginalConstructor()
78 ->onlyMethods([
'getComponentLogger'])
80 $logger_factory->method(
'getComponentLogger')->willReturn($logger);
Customizing of pimple-DIC for ILIAS.
setGlobalVariable(string $name, $value)
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
initRepositoryTreeDependencies()