ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilScorm2004BaseTestCase Class Reference

Class ilScorm2004BaseTestCase. More...

+ Inheritance diagram for ilScorm2004BaseTestCase:
+ Collaboration diagram for ilScorm2004BaseTestCase:

Protected Member Functions

 setUp ()
 
 setGlobalVariable (string $name, mixed $value)
 
 getGlobalTemplateMock ()
 
 getDatabaseMock ()
 
 getIliasMock ()
 
 addGlobal_ilAccess ()
 
 addGlobal_ilUser ()
 
 addGlobal_objDefinition ()
 
 addGlobal_tree ()
 
 addGlobal_ilSetting ()
 
 addGlobal_rbacsystem ()
 
 addGlobal_ilCtrl ()
 
 addGlobal_lng ()
 
 addGlobal_filesystem ()
 
 addGlobal_upload ()
 
 addGlobal_ilDB ()
 
 addGlobal_ilLog ()
 
 addGlobal_ilias ()
 
 addGlobal_ilErr ()
 
 addGlobal_ilAppEventHandler ()
 
 addGlobal_tpl ()
 
 addGlobal_ilPluginAdmin ()
 
 addGlobal_ilTabs ()
 
 addGlobal_ilObjDataCache ()
 
 addGlobal_ilLocator ()
 
 addGlobal_rbacreview ()
 
 addGlobal_ilToolbar ()
 
 addGlobal_http ()
 
 addGlobal_ilIliasIniFile ()
 
 addGlobal_ilLoggerFactory ()
 
 addGlobal_ilHelp ()
 
 addGlobal_uiFactory ()
 
 addGlobal_uiRenderer ()
 
 addGlobal_refinery ()
 

Protected Attributes

Container $dic
 

Detailed Description

Member Function Documentation

◆ addGlobal_filesystem()

ilScorm2004BaseTestCase::addGlobal_filesystem ( )
protected

Definition at line 124 of file ilScorm2004BaseTestCase.php.

124 : void
125 {
126 $this->setGlobalVariable("filesystem", $this->createMock(Filesystems::class));
127 }
setGlobalVariable(string $name, mixed $value)

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_http()

ilScorm2004BaseTestCase::addGlobal_http ( )
protected

Definition at line 194 of file ilScorm2004BaseTestCase.php.

194 : void
195 {
196 $this->setGlobalVariable("http", $this->createMock(Services::class));
197 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_ilAccess()

ilScorm2004BaseTestCase::addGlobal_ilAccess ( )
protected

Definition at line 84 of file ilScorm2004BaseTestCase.php.

84 : void
85 {
86 $this->setGlobalVariable("ilAccess", $this->createMock(ilAccess::class));
87 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_ilAppEventHandler()

ilScorm2004BaseTestCase::addGlobal_ilAppEventHandler ( )
protected

Definition at line 154 of file ilScorm2004BaseTestCase.php.

154 : void
155 {
156 $this->setGlobalVariable("ilAppEventHandler", $this->createMock(ilAppEventHandler::class));
157 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_ilCtrl()

ilScorm2004BaseTestCase::addGlobal_ilCtrl ( )
protected

Definition at line 114 of file ilScorm2004BaseTestCase.php.

114 : void
115 {
116 $this->setGlobalVariable("ilCtrl", $this->createMock(ilCtrl::class));
117 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_ilDB()

ilScorm2004BaseTestCase::addGlobal_ilDB ( )
protected

Definition at line 134 of file ilScorm2004BaseTestCase.php.

134 : void
135 {
136 $this->setGlobalVariable("ilDB", $this->createMock(ilDBInterface::class));
137 }

References setGlobalVariable().

Referenced by ilScorm2004TrackingItemsTest\setUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilErr()

ilScorm2004BaseTestCase::addGlobal_ilErr ( )
protected

Definition at line 149 of file ilScorm2004BaseTestCase.php.

149 : void
150 {
151 $this->setGlobalVariable("ilErr", $this->createMock(ilErrorHandling::class));
152 }

References setGlobalVariable().

Referenced by ilScorm2004TrackingItemsTest\setUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilHelp()

ilScorm2004BaseTestCase::addGlobal_ilHelp ( )
protected

Definition at line 209 of file ilScorm2004BaseTestCase.php.

209 : void
210 {
211 $this->setGlobalVariable("ilHelp", $this->createMock(ilHelp::class));
212 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_ilias()

ilScorm2004BaseTestCase::addGlobal_ilias ( )
protected

Definition at line 144 of file ilScorm2004BaseTestCase.php.

144 : void
145 {
146 $this->setGlobalVariable("ilias", $this->getIliasMock());
147 }

References getIliasMock(), and setGlobalVariable().

Referenced by ilScorm2004TrackingItemsTest\setUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_ilIliasIniFile()

ilScorm2004BaseTestCase::addGlobal_ilIliasIniFile ( )
protected

Definition at line 199 of file ilScorm2004BaseTestCase.php.

199 : void
200 {
201 $this->setGlobalVariable("ilIliasIniFile", $this->createMock(ilIniFile::class));
202 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_ilLocator()

ilScorm2004BaseTestCase::addGlobal_ilLocator ( )
protected

Definition at line 179 of file ilScorm2004BaseTestCase.php.

179 : void
180 {
181 $this->setGlobalVariable("ilLocator", $this->createMock(ilLocatorGUI::class));
182 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_ilLog()

ilScorm2004BaseTestCase::addGlobal_ilLog ( )
protected

Definition at line 139 of file ilScorm2004BaseTestCase.php.

139 : void
140 {
141 $this->setGlobalVariable("ilLog", $this->createMock(ilLogger::class));
142 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_ilLoggerFactory()

ilScorm2004BaseTestCase::addGlobal_ilLoggerFactory ( )
protected

Definition at line 204 of file ilScorm2004BaseTestCase.php.

204 : void
205 {
206 $this->setGlobalVariable("ilLoggerFactory", $this->createMock(ilLoggerFactory::class));
207 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_ilObjDataCache()

ilScorm2004BaseTestCase::addGlobal_ilObjDataCache ( )
protected

Definition at line 174 of file ilScorm2004BaseTestCase.php.

174 : void
175 {
176 $this->setGlobalVariable("ilObjDataCache", $this->createMock(ilObjectDataCache::class));
177 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_ilPluginAdmin()

ilScorm2004BaseTestCase::addGlobal_ilPluginAdmin ( )
protected

Definition at line 164 of file ilScorm2004BaseTestCase.php.

164 : void
165 {
166 $this->setGlobalVariable("ilPluginAdmin", $this->createMock(ilPluginAdmin::class));
167 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_ilSetting()

ilScorm2004BaseTestCase::addGlobal_ilSetting ( )
protected

Definition at line 104 of file ilScorm2004BaseTestCase.php.

104 : void
105 {
106 $this->setGlobalVariable("ilSetting", $this->createMock(ilSetting::class));
107 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_ilTabs()

ilScorm2004BaseTestCase::addGlobal_ilTabs ( )
protected

Definition at line 169 of file ilScorm2004BaseTestCase.php.

169 : void
170 {
171 $this->setGlobalVariable("ilTabs", $this->createMock(ilTabsGUI::class));
172 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_ilToolbar()

ilScorm2004BaseTestCase::addGlobal_ilToolbar ( )
protected

Definition at line 189 of file ilScorm2004BaseTestCase.php.

189 : void
190 {
191 $this->setGlobalVariable("ilToolbar", $this->createMock(ilToolbarGUI::class));
192 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_ilUser()

ilScorm2004BaseTestCase::addGlobal_ilUser ( )
protected

Definition at line 89 of file ilScorm2004BaseTestCase.php.

89 : void
90 {
91 $this->setGlobalVariable("ilUser", $this->createMock(ilObjUser::class));
92 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_lng()

ilScorm2004BaseTestCase::addGlobal_lng ( )
protected

Definition at line 119 of file ilScorm2004BaseTestCase.php.

119 : void
120 {
121 $this->setGlobalVariable("lng", $this->createMock(ilLanguage::class));
122 }

References setGlobalVariable().

Referenced by ilScorm2004TrackingItemsTest\setUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlobal_objDefinition()

ilScorm2004BaseTestCase::addGlobal_objDefinition ( )
protected

Definition at line 94 of file ilScorm2004BaseTestCase.php.

94 : void
95 {
96 $this->setGlobalVariable("objDefinition", $this->createMock(ilObjectDefinition::class));
97 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_rbacreview()

ilScorm2004BaseTestCase::addGlobal_rbacreview ( )
protected

Definition at line 184 of file ilScorm2004BaseTestCase.php.

184 : void
185 {
186 $this->setGlobalVariable("rbacreview", $this->createMock(ilRbacReview::class));
187 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_rbacsystem()

ilScorm2004BaseTestCase::addGlobal_rbacsystem ( )
protected

Definition at line 109 of file ilScorm2004BaseTestCase.php.

109 : void
110 {
111 $this->setGlobalVariable("rbacsystem", $this->createMock(ilRbacSystem::class));
112 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_refinery()

ilScorm2004BaseTestCase::addGlobal_refinery ( )
protected

Definition at line 224 of file ilScorm2004BaseTestCase.php.

224 : void
225 {
226 $refineryMock = $this->getMockBuilder(RefineryFactory::class)->disableOriginalConstructor()->getMock();
227 $refineryMock->expects(self::any())->method('random')->willReturn($this->getMockBuilder(RandomGroup::class)->getMock());
228 $this->setGlobalVariable("refinery", $refineryMock);
229 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_tpl()

ilScorm2004BaseTestCase::addGlobal_tpl ( )
protected

Definition at line 159 of file ilScorm2004BaseTestCase.php.

159 : void
160 {
161 $this->setGlobalVariable("tpl", $this->createMock(ilGlobalPageTemplate::class));
162 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_tree()

ilScorm2004BaseTestCase::addGlobal_tree ( )
protected

Definition at line 99 of file ilScorm2004BaseTestCase.php.

99 : void
100 {
101 $this->setGlobalVariable("tree", $this->createMock(ilTree::class));
102 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_uiFactory()

ilScorm2004BaseTestCase::addGlobal_uiFactory ( )
protected

Definition at line 214 of file ilScorm2004BaseTestCase.php.

214 : void
215 {
216 $this->setGlobalVariable("ui.factory", $this->createMock(FactoryInternal::class));
217 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_uiRenderer()

ilScorm2004BaseTestCase::addGlobal_uiRenderer ( )
protected

Definition at line 219 of file ilScorm2004BaseTestCase.php.

219 : void
220 {
221 $this->setGlobalVariable("ui.renderer", $this->createMock(ILIAS\UI\Implementation\DefaultRenderer::class));
222 }
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.

References setGlobalVariable().

+ Here is the call graph for this function:

◆ addGlobal_upload()

ilScorm2004BaseTestCase::addGlobal_upload ( )
protected

Definition at line 129 of file ilScorm2004BaseTestCase.php.

129 : void
130 {
131 $this->setGlobalVariable("upload", $this->createMock(FileUpload::class));
132 }

References setGlobalVariable().

+ Here is the call graph for this function:

◆ getDatabaseMock()

ilScorm2004BaseTestCase::getDatabaseMock ( )
protected

Definition at line 66 of file ilScorm2004BaseTestCase.php.

66 : MockObject
67 {
68 return $this->getMockBuilder(ilDBInterface::class)->disableOriginalConstructor()->getMock();
69 }

◆ getGlobalTemplateMock()

ilScorm2004BaseTestCase::getGlobalTemplateMock ( )
protected

Definition at line 61 of file ilScorm2004BaseTestCase.php.

61 : MockObject
62 {
63 return $this->getMockBuilder(ilTemplate::class)->disableOriginalConstructor()->getMock();
64 }

◆ getIliasMock()

ilScorm2004BaseTestCase::getIliasMock ( )
protected

Definition at line 71 of file ilScorm2004BaseTestCase.php.

71 : MockObject
72 {
73 $mock = $this->getMockBuilder(ILIAS::class)->disableOriginalConstructor()->getMock();
74
75 $account = new stdClass();
76 $account->id = 6;
77 $account->fullname = 'Esther Tester';
78
79 $mock->account = $account;
80
81 return $mock;
82 }

Referenced by addGlobal_ilias().

+ Here is the caller graph for this function:

◆ setGlobalVariable()

ilScorm2004BaseTestCase::setGlobalVariable ( string  $name,
mixed  $value 
)
protected

◆ setUp()

ilScorm2004BaseTestCase::setUp ( )
protected

Reimplemented in ilScorm2004TrackingItemsTest.

Definition at line 43 of file ilScorm2004BaseTestCase.php.

43 : void
44 {
45 $this->dic = new Container();
46 $GLOBALS['DIC'] = $this->dic;
47
48 parent::setUp();
49 }

References $dic, and $GLOBALS.

Field Documentation

◆ $dic

Container ilScorm2004BaseTestCase::$dic
protected

Definition at line 38 of file ilScorm2004BaseTestCase.php.

Referenced by setUp().


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