10 $languageMock = $this->getMockBuilder(
'ilLanguage')
11 ->disableOriginalConstructor()
12 ->setMethods(array(
'txt'))
15 $templateMock = $this->getMockBuilder(
'ilTemplate')
16 ->disableOriginalConstructor()
19 $templateMock->method(
'get')
22 $userDefinePlaceholderMock = $this->getMockBuilder(
'ilUserDefinedFieldsPlaceholderDescription')
23 ->disableOriginalConstructor()
26 $userDefinePlaceholderMock->method(
'createPlaceholderHtmlDescription')
27 ->willReturn(array());
29 $userDefinePlaceholderMock->method(
'getPlaceholderDescriptions')
30 ->willReturn(array());
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(3))
48 ->willReturn(
'Something translated');
50 $defaultPlaceholder = $this->getMockBuilder(
'ilDefaultPlaceholderDescription')
51 ->disableOriginalConstructor()
54 $defaultPlaceholder->method(
'getPlaceholderDescriptions')
57 'SOMETHING' =>
'SOMEWHAT',
58 'SOMETHING_ELSE' =>
'ANYTHING' 64 $placeHolders = $placeholderDescriptionObject->getPlaceholderDescriptions();
68 'COURSE_TITLE' =>
'Something translated',
69 'SOMETHING' =>
'SOMEWHAT',
70 'SOMETHING_ELSE' =>
'ANYTHING',
71 'DATE_COMPLETED' =>
'Something translated',
72 'DATETIME_COMPLETED' =>
'Something translated'
testPlaceholderDescriptions()
testPlaceholderGetHtmlDescription()