ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ilCertificateTypeClassMapTest Class Reference
+ Inheritance diagram for ilCertificateTypeClassMapTest:
+ Collaboration diagram for ilCertificateTypeClassMapTest:

Public Member Functions

 testFetchCoursePlaceHolderClass ()
 
 testFetchTestPlaceHolderClass ()
 
 testFetchExercisePlaceHolderClass ()
 
 testFetchScormPlaceHolderClass ()
 
 testFetchUnknownClassWillResultInException ()
 
 testIsCourseExisting ()
 
 testIsTestExisting ()
 
 testIsExerciseExisting ()
 
 testUnknownTypeIsNotExisting ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from ilCertificateBaseTestCase
 setUp ()
 
 setGlobalVariable (string $name, $value)
 

Private Attributes

ilCertificateTypeClassMap $classMap
 

Additional Inherited Members

- Protected Attributes inherited from ilCertificateBaseTestCase
Container $dic
 

Detailed Description

Member Function Documentation

◆ setUp()

ilCertificateTypeClassMapTest::setUp ( )
protected

Definition at line 32 of file ilCertificateTypeClassMapTest.php.

32  : void
33  {
34  $this->classMap = new ilCertificateTypeClassMap();
35  }

◆ testFetchCoursePlaceHolderClass()

ilCertificateTypeClassMapTest::testFetchCoursePlaceHolderClass ( )

Definition at line 37 of file ilCertificateTypeClassMapTest.php.

37  : void
38  {
39  $class = $this->classMap->getPlaceHolderClassNameByType('crs');
40 
41  $this->assertSame(CoursePlaceholderValues::class, $class);
42  }

◆ testFetchExercisePlaceHolderClass()

ilCertificateTypeClassMapTest::testFetchExercisePlaceHolderClass ( )

Definition at line 51 of file ilCertificateTypeClassMapTest.php.

51  : void
52  {
53  $class = $this->classMap->getPlaceHolderClassNameByType('exc');
54 
55  $this->assertSame(ExercisePlaceholderValues::class, $class);
56  }

◆ testFetchScormPlaceHolderClass()

ilCertificateTypeClassMapTest::testFetchScormPlaceHolderClass ( )

Definition at line 58 of file ilCertificateTypeClassMapTest.php.

58  : void
59  {
60  $class = $this->classMap->getPlaceHolderClassNameByType('sahs');
61 
62  $this->assertSame(ilScormPlaceholderValues::class, $class);
63  }

◆ testFetchTestPlaceHolderClass()

ilCertificateTypeClassMapTest::testFetchTestPlaceHolderClass ( )

Definition at line 44 of file ilCertificateTypeClassMapTest.php.

44  : void
45  {
46  $class = $this->classMap->getPlaceHolderClassNameByType('tst');
47 
48  $this->assertSame(TestPlaceholderValues::class, $class);
49  }

◆ testFetchUnknownClassWillResultInException()

ilCertificateTypeClassMapTest::testFetchUnknownClassWillResultInException ( )

Definition at line 65 of file ilCertificateTypeClassMapTest.php.

65  : never
66  {
67  $this->expectException(ilException::class);
68 
69  $this->classMap->getPlaceHolderClassNameByType('something');
70 
71  $this->fail('Should never happen. No Exception thrown?');
72  }

◆ testIsCourseExisting()

ilCertificateTypeClassMapTest::testIsCourseExisting ( )

Definition at line 74 of file ilCertificateTypeClassMapTest.php.

74  : void
75  {
76  $result = $this->classMap->typeExistsInMap('crs');
77 
78  $this->assertTrue($result);
79  }

◆ testIsExerciseExisting()

ilCertificateTypeClassMapTest::testIsExerciseExisting ( )

Definition at line 88 of file ilCertificateTypeClassMapTest.php.

88  : void
89  {
90  $result = $this->classMap->typeExistsInMap('exc');
91 
92  $this->assertTrue($result);
93  }

◆ testIsTestExisting()

ilCertificateTypeClassMapTest::testIsTestExisting ( )

Definition at line 81 of file ilCertificateTypeClassMapTest.php.

81  : void
82  {
83  $result = $this->classMap->typeExistsInMap('tst');
84 
85  $this->assertTrue($result);
86  }

◆ testUnknownTypeIsNotExisting()

ilCertificateTypeClassMapTest::testUnknownTypeIsNotExisting ( )

Definition at line 95 of file ilCertificateTypeClassMapTest.php.

95  : void
96  {
97  $result = $this->classMap->typeExistsInMap('something');
98 
99  $this->assertFalse($result);
100  }

Field Documentation

◆ $classMap

ilCertificateTypeClassMap ilCertificateTypeClassMapTest::$classMap
private

Definition at line 30 of file ilCertificateTypeClassMapTest.php.


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