11 $languageMock = $this->getMockBuilder(
'ilLanguage')
12 ->disableOriginalConstructor()
13 ->setMethods(array(
'txt'))
16 $templateMock = $this->getMockBuilder(
'ilTemplate')
17 ->disableOriginalConstructor()
20 $templateMock->method(
'get')
23 $userDefinePlaceholderMock = $this->getMockBuilder(
'ilUserDefinedFieldsPlaceholderDescription')
24 ->disableOriginalConstructor()
27 $userDefinePlaceholderMock->method(
'createPlaceholderHtmlDescription')
28 ->willReturn(array());
30 $userDefinePlaceholderMock->method(
'getPlaceholderDescriptions')
31 ->willReturn(array());
35 $html = $placeholderDescriptionObject->createPlaceholderHtmlDescription($templateMock);
37 $this->assertEquals(
'',
$html);
42 $languageMock = $this->getMockBuilder(
'ilLanguage')
43 ->disableOriginalConstructor()
44 ->setMethods(array(
'txt'))
47 $languageMock->expects($this->exactly(16))
49 ->willReturn(
'Something translated');
51 $userDefinePlaceholderMock = $this->getMockBuilder(
'ilUserDefinedFieldsPlaceholderDescription')
52 ->disableOriginalConstructor()
55 $userDefinePlaceholderMock->method(
'createPlaceholderHtmlDescription')
56 ->willReturn(array());
58 $userDefinePlaceholderMock->method(
'getPlaceholderDescriptions')
59 ->willReturn(array());
63 $placeHolders = $placeholderDescriptionObject->getPlaceholderDescriptions();
67 'USER_LOGIN' =>
'Something translated',
68 'USER_FULLNAME' =>
'Something translated',
69 'USER_FIRSTNAME' =>
'Something translated',
70 'USER_LASTNAME' =>
'Something translated',
71 'USER_TITLE' =>
'Something translated',
72 'USER_SALUTATION' =>
'Something translated',
73 'USER_BIRTHDAY' =>
'Something translated',
74 'USER_INSTITUTION' =>
'Something translated',
75 'USER_DEPARTMENT' =>
'Something translated',
76 'USER_STREET' =>
'Something translated',
77 'USER_CITY' =>
'Something translated',
78 'USER_ZIPCODE' =>
'Something translated',
79 'USER_COUNTRY' =>
'Something translated',
80 'USER_MATRICULATION' =>
'Something translated',
81 'DATE' =>
'Something translated',
82 'DATETIME' =>
'Something translated'
testCreateHtmlDescription()
Collection of basic placeholder values that can be used.
testPlaceholderDescription()