ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilTestResultsImportParserTest.php
Go to the documentation of this file.
1 <?php
2 
24 {
26 
27  protected function setUp(): 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  }
37 
39  {
40  $this->assertInstanceOf(ilTestResultsImportParser::class, $this->testObj);
41  }
42 
43  public function testQuestionIdMapping(): void
44  {
45  $expected = [
46  12 => 17,
47  124 => 19
48  ];
49  $this->testObj->setQuestionIdMapping($expected);
50  $this->assertEquals($expected, $this->testObj->getQuestionIdMapping());
51  }
52 
53  public function testSrcPoolDefIdMapping(): void
54  {
55  $expected = [
56  12 => 17,
57  124 => 19
58  ];
59  $this->testObj->setSrcPoolDefIdMapping($expected);
60  $this->assertEquals($expected, $this->testObj->getSrcPoolDefIdMapping());
61  }
62 }
global $DIC
Definition: feed.php:28
Class ilTestBaseClass.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...