◆ testCreateHtmlDescription()
ilDefaultPlaceholderDescriptionTest::testCreateHtmlDescription |
( |
| ) |
|
Definition at line 26 of file ilDefaultPlaceholderDescriptionTest.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')
52 $html = $placeholderDescriptionObject->createPlaceholderHtmlDescription($templateMock);
54 $this->assertSame(
'', $html);
Collection of basic placeholder values that can be used.
◆ testPlaceholderDescription()
ilDefaultPlaceholderDescriptionTest::testPlaceholderDescription |
( |
| ) |
|
Definition at line 57 of file ilDefaultPlaceholderDescriptionTest.php.
59 $languageMock = $this->getMockBuilder(ilLanguage::class)
60 ->disableOriginalConstructor()
61 ->onlyMethods([
'txt',
'loadLanguageModule'])
64 $languageMock->expects($this->exactly(16))
66 ->willReturn(
'Something translated');
68 $userDefinePlaceholderMock = $this->getMockBuilder(ilUserDefinedFieldsPlaceholderDescription::class)
69 ->disableOriginalConstructor()
72 $userDefinePlaceholderMock->method(
'createPlaceholderHtmlDescription')
75 $userDefinePlaceholderMock->method(
'getPlaceholderDescriptions')
80 $placeHolders = $placeholderDescriptionObject->getPlaceholderDescriptions();
84 'USER_LOGIN' =>
'Something translated',
85 'USER_FULLNAME' =>
'Something translated',
86 'USER_FIRSTNAME' =>
'Something translated',
87 'USER_LASTNAME' =>
'Something translated',
88 'USER_TITLE' =>
'Something translated',
89 'USER_SALUTATION' =>
'Something translated',
90 'USER_BIRTHDAY' =>
'Something translated',
91 'USER_INSTITUTION' =>
'Something translated',
92 'USER_DEPARTMENT' =>
'Something translated',
93 'USER_STREET' =>
'Something translated',
94 'USER_CITY' =>
'Something translated',
95 'USER_ZIPCODE' =>
'Something translated',
96 'USER_COUNTRY' =>
'Something translated',
97 'USER_MATRICULATION' =>
'Something translated',
98 'DATE' =>
'Something translated',
99 'DATETIME' =>
'Something translated' Collection of basic placeholder values that can be used.
The documentation for this class was generated from the following file: