ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
ilTestSkillLevelThresholdImportListTest Class Reference

Class ilTestSkillLevelThresholdImportListTest. More...

+ Inheritance diagram for ilTestSkillLevelThresholdImportListTest:
+ Collaboration diagram for ilTestSkillLevelThresholdImportListTest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testAddOriginalSkillTitle ()
 
 testAddOriginalSkillPath ()
 
 testAddSkillLevelThreshold ()
 
 testCurrent ()
 
 testNext ()
 
 testKey ()
 
 testValid ()
 
 testRewind ()
 
- Public Member Functions inherited from ilTestBaseTestCase
 createInstanceOf (string $class_name, array $explicit_parameters=[])
 
 createTraitInstanceOf (string $class_name, array $explicit_parameters=[])
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from ilTestBaseTestCase
 setUp ()
 
 tearDown ()
 

Private Attributes

ilTestSkillLevelThresholdImportList $testObj
 

Additional Inherited Members

- Static Public Member Functions inherited from ilTestBaseTestCase
static callMethod ($obj, $name, array $args=[])
 
static getNonPublicPropertyValue (object $obj, string $name)
 
- Data Fields inherited from ilTestBaseTestCase
const string MOCKED_METHOD_WITHOUT_OUTPUT = 'MOCKED_METHOD_WITHOUT_OUTPUT'
 
const string DYNAMIC_CLASS = 'DynamicClass'
 
- Protected Attributes inherited from ilTestBaseTestCase
Container $dic = null
 
Container $backup_dic = null
 
- Static Protected Attributes inherited from ilTestBaseTestCase
static int $DYNAMIC_CLASS_COUNT = 0
 

Detailed Description

Member Function Documentation

◆ setUp()

ilTestSkillLevelThresholdImportListTest::setUp ( )
protected

Reimplemented from ilTestBaseTestCase.

Definition at line 29 of file ilTestSkillLevelThresholdImportListTest.php.

29 : void
30 {
31 parent::setUp();
32
33 $this->testObj = new ilTestSkillLevelThresholdImportList();
34 }

◆ test_instantiateObject_shouldReturnInstance()

ilTestSkillLevelThresholdImportListTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 36 of file ilTestSkillLevelThresholdImportListTest.php.

36 : void
37 {
38 $this->assertInstanceOf(ilTestSkillLevelThresholdImportList::class, $this->testObj);
39 }

◆ testAddOriginalSkillPath()

ilTestSkillLevelThresholdImportListTest::testAddOriginalSkillPath ( )

Definition at line 53 of file ilTestSkillLevelThresholdImportListTest.php.

53 : void
54 {
55 $skillBaseId = 17;
56 $skillTrefId = 15;
57 $originalSkillPath = 'test/path';
58 $this->testObj->addOriginalSkillPath($skillBaseId, $skillTrefId, $originalSkillPath);
59
60 $reflProp = new ReflectionProperty($this->testObj, 'originalSkillPaths');
61
62 $this->assertEquals(["$skillBaseId:$skillTrefId" => $originalSkillPath], $reflProp->getValue($this->testObj));
63 }

◆ testAddOriginalSkillTitle()

ilTestSkillLevelThresholdImportListTest::testAddOriginalSkillTitle ( )

Definition at line 41 of file ilTestSkillLevelThresholdImportListTest.php.

41 : void
42 {
43 $skillBaseId = 17;
44 $skillTrefId = 15;
45 $originalSkillTitle = 'Test';
46 $this->testObj->addOriginalSkillTitle($skillBaseId, $skillTrefId, $originalSkillTitle);
47
48 $reflProp = new ReflectionProperty($this->testObj, 'originalSkillTitles');
49
50 $this->assertEquals(["$skillBaseId:$skillTrefId" => $originalSkillTitle], $reflProp->getValue($this->testObj));
51 }

◆ testAddSkillLevelThreshold()

ilTestSkillLevelThresholdImportListTest::testAddSkillLevelThreshold ( )

Definition at line 65 of file ilTestSkillLevelThresholdImportListTest.php.

65 : void
66 {
67 $testSkillLevelThresholdImport = new ilTestSkillLevelThresholdImport();
68 $this->testObj->addSkillLevelThreshold($testSkillLevelThresholdImport);
69
70 $reflProp = new ReflectionProperty($this->testObj, 'importedSkillLevelThresholds');
71
72 $this->assertEquals([$testSkillLevelThresholdImport], $reflProp->getValue($this->testObj));
73 }

◆ testCurrent()

ilTestSkillLevelThresholdImportListTest::testCurrent ( )

Definition at line 75 of file ilTestSkillLevelThresholdImportListTest.php.

75 : void
76 {
77 $testSkillLevelThresholdImport = new ilTestSkillLevelThresholdImport();
78 $this->testObj->addSkillLevelThreshold($testSkillLevelThresholdImport);
79
80 $this->assertEquals($testSkillLevelThresholdImport, $this->testObj->current());
81 }

◆ testKey()

ilTestSkillLevelThresholdImportListTest::testKey ( )

Definition at line 95 of file ilTestSkillLevelThresholdImportListTest.php.

95 : void
96 {
97 $testSkillLevelThresholdImport1 = new ilTestSkillLevelThresholdImport();
98 $testSkillLevelThresholdImport2 = new ilTestSkillLevelThresholdImport();
99
100 $this->testObj->addSkillLevelThreshold($testSkillLevelThresholdImport1);
101 $this->testObj->addSkillLevelThreshold($testSkillLevelThresholdImport2);
102
103 $this->testObj->next();
104 $this->assertEquals(1, $this->testObj->key());
105 }

◆ testNext()

ilTestSkillLevelThresholdImportListTest::testNext ( )

Definition at line 83 of file ilTestSkillLevelThresholdImportListTest.php.

83 : void
84 {
85 $testSkillLevelThresholdImport1 = new ilTestSkillLevelThresholdImport();
86 $testSkillLevelThresholdImport2 = new ilTestSkillLevelThresholdImport();
87
88 $this->testObj->addSkillLevelThreshold($testSkillLevelThresholdImport1);
89 $this->testObj->addSkillLevelThreshold($testSkillLevelThresholdImport2);
90
91 $this->testObj->next();
92 $this->assertEquals($testSkillLevelThresholdImport2, $this->testObj->current());
93 }

◆ testRewind()

ilTestSkillLevelThresholdImportListTest::testRewind ( )

Definition at line 119 of file ilTestSkillLevelThresholdImportListTest.php.

119 : void
120 {
121 $testSkillLevelThresholdImport1 = new ilTestSkillLevelThresholdImport();
122 $testSkillLevelThresholdImport2 = new ilTestSkillLevelThresholdImport();
123
124 $this->testObj->addSkillLevelThreshold($testSkillLevelThresholdImport1);
125 $this->testObj->addSkillLevelThreshold($testSkillLevelThresholdImport2);
126
127 $this->testObj->next();
128 $this->testObj->next();
129 $this->testObj->rewind();
130 $this->assertEquals($testSkillLevelThresholdImport1, $this->testObj->current());
131 }

◆ testValid()

ilTestSkillLevelThresholdImportListTest::testValid ( )

Definition at line 107 of file ilTestSkillLevelThresholdImportListTest.php.

107 : void
108 {
109 $this->assertFalse($this->testObj->valid());
110 $testSkillLevelThresholdImport1 = new ilTestSkillLevelThresholdImport();
111 $testSkillLevelThresholdImport2 = new ilTestSkillLevelThresholdImport();
112
113 $this->testObj->addSkillLevelThreshold($testSkillLevelThresholdImport1);
114 $this->testObj->addSkillLevelThreshold($testSkillLevelThresholdImport2);
115
116 $this->assertTrue($this->testObj->valid());
117 }

Field Documentation

◆ $testObj

ilTestSkillLevelThresholdImportList ilTestSkillLevelThresholdImportListTest::$testObj
private

Definition at line 27 of file ilTestSkillLevelThresholdImportListTest.php.


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