ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 54 of file ilTestSkillLevelThresholdImportListTest.php.

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

◆ 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 $reflProp->setAccessible(true);
50
51 $this->assertEquals(["$skillBaseId:$skillTrefId" => $originalSkillTitle], $reflProp->getValue($this->testObj));
52 }

◆ testAddSkillLevelThreshold()

ilTestSkillLevelThresholdImportListTest::testAddSkillLevelThreshold ( )

Definition at line 67 of file ilTestSkillLevelThresholdImportListTest.php.

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

◆ testCurrent()

ilTestSkillLevelThresholdImportListTest::testCurrent ( )

Definition at line 78 of file ilTestSkillLevelThresholdImportListTest.php.

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

◆ testKey()

ilTestSkillLevelThresholdImportListTest::testKey ( )

Definition at line 98 of file ilTestSkillLevelThresholdImportListTest.php.

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

◆ testNext()

ilTestSkillLevelThresholdImportListTest::testNext ( )

Definition at line 86 of file ilTestSkillLevelThresholdImportListTest.php.

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

◆ testRewind()

ilTestSkillLevelThresholdImportListTest::testRewind ( )

Definition at line 122 of file ilTestSkillLevelThresholdImportListTest.php.

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

◆ testValid()

ilTestSkillLevelThresholdImportListTest::testValid ( )

Definition at line 110 of file ilTestSkillLevelThresholdImportListTest.php.

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

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: