19declare(strict_types=1);
29 protected function setUp(): void
38 $this->assertInstanceOf(ilTestSkillLevelThresholdImportList::class, $this->testObj);
45 $originalSkillTitle =
'Test';
46 $this->testObj->addOriginalSkillTitle($skillBaseId, $skillTrefId, $originalSkillTitle);
48 $reflProp =
new ReflectionProperty($this->testObj,
'originalSkillTitles');
50 $this->assertEquals([
"$skillBaseId:$skillTrefId" => $originalSkillTitle], $reflProp->getValue($this->testObj));
57 $originalSkillPath =
'test/path';
58 $this->testObj->addOriginalSkillPath($skillBaseId, $skillTrefId, $originalSkillPath);
60 $reflProp =
new ReflectionProperty($this->testObj,
'originalSkillPaths');
62 $this->assertEquals([
"$skillBaseId:$skillTrefId" => $originalSkillPath], $reflProp->getValue($this->testObj));
68 $this->testObj->addSkillLevelThreshold($testSkillLevelThresholdImport);
70 $reflProp =
new ReflectionProperty($this->testObj,
'importedSkillLevelThresholds');
72 $this->assertEquals([$testSkillLevelThresholdImport], $reflProp->getValue($this->testObj));
78 $this->testObj->addSkillLevelThreshold($testSkillLevelThresholdImport);
80 $this->assertEquals($testSkillLevelThresholdImport, $this->testObj->current());
88 $this->testObj->addSkillLevelThreshold($testSkillLevelThresholdImport1);
89 $this->testObj->addSkillLevelThreshold($testSkillLevelThresholdImport2);
91 $this->testObj->next();
92 $this->assertEquals($testSkillLevelThresholdImport2, $this->testObj->current());
100 $this->testObj->addSkillLevelThreshold($testSkillLevelThresholdImport1);
101 $this->testObj->addSkillLevelThreshold($testSkillLevelThresholdImport2);
103 $this->testObj->next();
104 $this->assertEquals(1, $this->testObj->key());
109 $this->assertFalse($this->testObj->valid());
113 $this->testObj->addSkillLevelThreshold($testSkillLevelThresholdImport1);
114 $this->testObj->addSkillLevelThreshold($testSkillLevelThresholdImport2);
116 $this->assertTrue($this->testObj->valid());
124 $this->testObj->addSkillLevelThreshold($testSkillLevelThresholdImport1);
125 $this->testObj->addSkillLevelThreshold($testSkillLevelThresholdImport2);
127 $this->testObj->next();
128 $this->testObj->next();
129 $this->testObj->rewind();
130 $this->assertEquals($testSkillLevelThresholdImport1, $this->testObj->current());
Class ilTestSkillLevelThresholdImportListTest.
testAddSkillLevelThreshold()
testAddOriginalSkillTitle()
test_instantiateObject_shouldReturnInstance()
testAddOriginalSkillPath()
ilTestSkillLevelThresholdImportList $testObj