◆ testPlaceholderDescriptions()
ilCoursePlaceholderDescriptionTest::testPlaceholderDescriptions |
( |
| ) |
|
Definition at line 70 of file ilCoursePlaceholderDescriptionTest.php.
72 $languageMock = $this->getMockBuilder(ilLanguage::class)
73 ->disableOriginalConstructor()
74 ->onlyMethods([
'txt'])
77 $languageMock->expects($this->exactly(3))
79 ->willReturn(
'Something translated');
81 $defaultPlaceholder = $this->getMockBuilder(ilDefaultPlaceholderDescription::class)
82 ->disableOriginalConstructor()
85 $defaultPlaceholder->method(
'getPlaceholderDescriptions')
88 'SOMETHING' =>
'SOMEWHAT',
89 'SOMETHING_ELSE' =>
'ANYTHING' 93 $customUserPlaceholderObject = $this->getMockBuilder(ilObjectCustomUserFieldsPlaceholderDescription::class)
94 ->disableOriginalConstructor()
97 $customUserPlaceholderObject->method(
'getPlaceholderDescriptions')
100 '+SOMETHING' =>
'SOMEWHAT',
101 '+SOMETHING_ELSE' =>
'ANYTHING' 107 $placeHolders = $placeholderDescriptionObject->getPlaceholderDescriptions();
111 'COURSE_TITLE' =>
'Something translated',
112 'SOMETHING' =>
'SOMEWHAT',
113 'SOMETHING_ELSE' =>
'ANYTHING',
114 '+SOMETHING' =>
'SOMEWHAT',
115 '+SOMETHING_ELSE' =>
'ANYTHING',
116 'DATE_COMPLETED' =>
'Something translated',
117 'DATETIME_COMPLETED' =>
'Something translated'
◆ testPlaceholderGetHtmlDescription()
ilCoursePlaceholderDescriptionTest::testPlaceholderGetHtmlDescription |
( |
| ) |
|
Definition at line 26 of file ilCoursePlaceholderDescriptionTest.php.
28 $languageMock = $this->getMockBuilder(ilLanguage::class)
29 ->disableOriginalConstructor()
30 ->onlyMethods([
'txt',
'loadLanguageModule'])
33 $templateMock = $this->getMockBuilder(ilTemplate::class)
34 ->disableOriginalConstructor()
37 $templateMock->method(
'get')
40 $userDefinePlaceholderMock = $this->getMockBuilder(ilUserDefinedFieldsPlaceholderDescription::class)
41 ->disableOriginalConstructor()
44 $userDefinePlaceholderMock->method(
'createPlaceholderHtmlDescription')
47 $userDefinePlaceholderMock->method(
'getPlaceholderDescriptions')
50 $customUserPlaceholderObject = $this->getMockBuilder(ilObjectCustomUserFieldsPlaceholderDescription::class)
51 ->disableOriginalConstructor()
54 $customUserPlaceholderObject->method(
"getPlaceholderDescriptions")
56 '+SOMETHING' =>
'SOMEWHAT',
57 '+SOMETHING_ELSE' =>
'ANYTHING' 60 $customUserPlaceholderObject->method(
'createPlaceholderHtmlDescription')
63 $placeholderDescriptionObject =
new ilCoursePlaceholderDescription(200, null, $languageMock, $userDefinePlaceholderMock, $customUserPlaceholderObject);
65 $html = $placeholderDescriptionObject->createPlaceholderHtmlDescription($templateMock);
67 $this->assertSame(
'', $html);
The documentation for this class was generated from the following file: