10 $languageMock = $this->getMockBuilder(
'ilLanguage')
11 ->disableOriginalConstructor()
12 ->setMethods(array(
'txt'))
15 $templateMock = $this->getMockBuilder(
'ilTemplate')
16 ->disableOriginalConstructor()
19 $userDefinePlaceholderMock = $this->getMockBuilder(
'ilUserDefinedFieldsPlaceholderDescription')
20 ->disableOriginalConstructor()
23 $userDefinePlaceholderMock->method(
'createPlaceholderHtmlDescription')
24 ->willReturn(array());
26 $userDefinePlaceholderMock->method(
'getPlaceholderDescriptions')
27 ->willReturn(array());
29 $templateMock->method(
'get')
34 $html = $placeholderDescriptionObject->createPlaceholderHtmlDescription($templateMock);
36 $this->assertEquals(
'',
$html);
41 $languageMock = $this->getMockBuilder(
'ilLanguage')
42 ->disableOriginalConstructor()
43 ->setMethods(array(
'txt'))
46 $languageMock->expects($this->exactly(21))
48 ->willReturn(
'Something translated');
50 $userDefinePlaceholderMock = $this->getMockBuilder(
'ilUserDefinedFieldsPlaceholderDescription')
51 ->disableOriginalConstructor()
54 $userDefinePlaceholderMock->method(
'createPlaceholderHtmlDescription')
55 ->willReturn(array());
57 $userDefinePlaceholderMock->method(
'getPlaceholderDescriptions')
58 ->willReturn(array());
62 $placeHolders = $placeholderDescriptionObject->getPlaceholderDescriptions();
66 'USER_LOGIN' =>
'Something translated',
67 'USER_FULLNAME' =>
'Something translated',
68 'USER_FIRSTNAME' =>
'Something translated',
69 'USER_LASTNAME' =>
'Something translated',
70 'USER_TITLE' =>
'Something translated',
71 'USER_SALUTATION' =>
'Something translated',
72 'USER_BIRTHDAY' =>
'Something translated',
73 'USER_INSTITUTION' =>
'Something translated',
74 'USER_DEPARTMENT' =>
'Something translated',
75 'USER_STREET' =>
'Something translated',
76 'USER_CITY' =>
'Something translated',
77 'USER_ZIPCODE' =>
'Something translated',
78 'USER_COUNTRY' =>
'Something translated',
79 'USER_MATRICULATION' =>
'Something translated',
80 'DATE' =>
'Something translated',
81 'DATETIME' =>
'Something translated',
82 'RESULT_PASSED' =>
'Something translated',
83 'RESULT_MARK' =>
'Something translated',
84 'EXERCISE_TITLE' =>
'Something translated',
85 'DATE_COMPLETED' =>
'Something translated',
86 'DATETIME_COMPLETED' =>
'Something translated'
testPlaceholderGetHtmlDescription()
testPlaceholderDescriptions()