ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilTestResultsImportParserTest Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilTestResultsImportParserTest:
+ Collaboration diagram for ilTestResultsImportParserTest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testQuestionIdMapping ()
 
 testSrcPoolDefIdMapping ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from ilTestBaseTestCase
 setUp ()
 
 tearDown ()
 
 setGlobalVariable (string $name, $value)
 
 getGlobalTemplateMock ()
 
 getDatabaseMock ()
 
 getIliasMock ()
 
 addGlobal_ilAccess ()
 
 addGlobal_ilUser ()
 
 addGlobal_objDefinition ()
 
 addGlobal_tree ()
 
 addGlobal_ilSetting ()
 
 addGlobal_rbacsystem ()
 
 addGlobal_ilRbacAdmin ()
 
 addGlobal_ilCtrl ()
 
 addGlobal_lng ()
 
 addGlobal_filesystem ()
 
 addGlobal_upload ()
 
 addGlobal_ilDB ()
 
 addGlobal_ilBench ()
 
 addGlobal_ilLog ()
 
 addGlobal_ilias ()
 
 addGlobal_ilErr ()
 
 addGlobal_GlobalScreenService ()
 
 addGlobal_ilNavigationHistory ()
 
 addGlobal_ilAppEventHandler ()
 
 addGlobal_tpl ()
 
 addGlobal_ilComponentRepository ()
 
 addGlobal_ilComponentFactory ()
 
 addGlobal_ilTabs ()
 
 addGlobal_ilObjDataCache ()
 
 addGlobal_ilLocator ()
 
 addGlobal_rbacreview ()
 
 addGlobal_ilToolbar ()
 
 addGlobal_http ()
 
 addGlobal_ilIliasIniFile ()
 
 addGlobal_ilLoggerFactory ()
 
 addGlobal_ilHelp ()
 
 addGlobal_ui ()
 
 addGlobal_uiFactory ()
 
 addGlobal_uiRenderer ()
 
 addGlobal_refinery ()
 
 addGlobal_skillService ()
 
 addGlobal_objectService ()
 
 addGlobal_resourceStorage ()
 
 getTestObjMock ()
 

Private Attributes

ilTestResultsImportParser $testObj
 

Additional Inherited Members

- Protected Attributes inherited from ilTestBaseTestCase
Container $dic = null
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilTestResultsImportParserTest

Author
Marvin Beym mbeym.nosp@m.@dat.nosp@m.abay..nosp@m.de

Definition at line 23 of file ilTestResultsImportParserTest.php.

Member Function Documentation

◆ setUp()

ilTestResultsImportParserTest::setUp ( )
protected

Definition at line 27 of file ilTestResultsImportParserTest.php.

References $DIC, and ilTestBaseTestCase\addGlobal_ilLog().

27  : void
28  {
29  global $DIC;
30  parent::setUp();
31 
32  $this->addGlobal_ilLog();
33 
34  $testObject = $this->createMock(ilObjTest::class);
35  $this->testObj = new ilTestResultsImportParser("", $testObject, $DIC['ilDB'], $DIC['ilLog'], $DIC['resource_storage']);
36  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

◆ test_instantiateObject_shouldReturnInstance()

ilTestResultsImportParserTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 38 of file ilTestResultsImportParserTest.php.

38  : void
39  {
40  $this->assertInstanceOf(ilTestResultsImportParser::class, $this->testObj);
41  }

◆ testQuestionIdMapping()

ilTestResultsImportParserTest::testQuestionIdMapping ( )

Definition at line 43 of file ilTestResultsImportParserTest.php.

43  : void
44  {
45  $expected = [
46  12 => 17,
47  124 => 19
48  ];
49  $this->testObj->setQuestionIdMapping($expected);
50  $this->assertEquals($expected, $this->testObj->getQuestionIdMapping());
51  }

◆ testSrcPoolDefIdMapping()

ilTestResultsImportParserTest::testSrcPoolDefIdMapping ( )

Definition at line 53 of file ilTestResultsImportParserTest.php.

53  : void
54  {
55  $expected = [
56  12 => 17,
57  124 => 19
58  ];
59  $this->testObj->setSrcPoolDefIdMapping($expected);
60  $this->assertEquals($expected, $this->testObj->getSrcPoolDefIdMapping());
61  }

Field Documentation

◆ $testObj

ilTestResultsImportParser ilTestResultsImportParserTest::$testObj
private

Definition at line 25 of file ilTestResultsImportParserTest.php.


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