ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 ()
 
 tearDown ()
 
 assertDoesNotThrow (callable $cb, string $message='')
 
 assertThrows (callable $cb, ?string $expected_class=null, ?string $expected_message=null)
 @template T of Throwable More...
 
 setGlobalVariable (string $name, mixed $value)
 

Private Attributes

ilCertificateTypeClassMap $classMap
 

Additional Inherited Members

- Protected Attributes inherited from ilCertificateBaseTestCase
Container $dic
 

Detailed Description

Definition at line 25 of file ilCertificateTypeClassMapTest.php.

Member Function Documentation

◆ setUp()

ilCertificateTypeClassMapTest::setUp ( )
protected

Reimplemented from ilCertificateBaseTestCase.

Definition at line 29 of file ilCertificateTypeClassMapTest.php.

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

◆ testFetchCoursePlaceHolderClass()

ilCertificateTypeClassMapTest::testFetchCoursePlaceHolderClass ( )

Definition at line 35 of file ilCertificateTypeClassMapTest.php.

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

◆ testFetchExercisePlaceHolderClass()

ilCertificateTypeClassMapTest::testFetchExercisePlaceHolderClass ( )

Definition at line 49 of file ilCertificateTypeClassMapTest.php.

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

◆ testFetchScormPlaceHolderClass()

ilCertificateTypeClassMapTest::testFetchScormPlaceHolderClass ( )

Definition at line 56 of file ilCertificateTypeClassMapTest.php.

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

◆ testFetchTestPlaceHolderClass()

ilCertificateTypeClassMapTest::testFetchTestPlaceHolderClass ( )

Definition at line 42 of file ilCertificateTypeClassMapTest.php.

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

◆ testFetchUnknownClassWillResultInException()

ilCertificateTypeClassMapTest::testFetchUnknownClassWillResultInException ( )

Definition at line 63 of file ilCertificateTypeClassMapTest.php.

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

◆ testIsCourseExisting()

ilCertificateTypeClassMapTest::testIsCourseExisting ( )

Definition at line 72 of file ilCertificateTypeClassMapTest.php.

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

◆ testIsExerciseExisting()

ilCertificateTypeClassMapTest::testIsExerciseExisting ( )

Definition at line 86 of file ilCertificateTypeClassMapTest.php.

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

◆ testIsTestExisting()

ilCertificateTypeClassMapTest::testIsTestExisting ( )

Definition at line 79 of file ilCertificateTypeClassMapTest.php.

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

◆ testUnknownTypeIsNotExisting()

ilCertificateTypeClassMapTest::testUnknownTypeIsNotExisting ( )

Definition at line 93 of file ilCertificateTypeClassMapTest.php.

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

Field Documentation

◆ $classMap

ilCertificateTypeClassMap ilCertificateTypeClassMapTest::$classMap
private

Definition at line 27 of file ilCertificateTypeClassMapTest.php.


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