10 $objectMock = $this->getMockBuilder(
'ilObject')
11 ->disableOriginalConstructor()
12 ->setMethods(array(
'txt'))
15 $languageMock = $this->getMockBuilder(
'ilLanguage')
16 ->disableOriginalConstructor()
17 ->setMethods(array(
'txt'))
20 $templateMock = $this->getMockBuilder(
'ilTemplate')
21 ->disableOriginalConstructor()
24 $templateMock->method(
'get')
27 $collectionInstance = $this->getMockBuilder(
'ilLPCollection')
28 ->disableOriginalConstructor()
29 ->setMethods(array(
'getPossibleItems'))
32 $learningProgressMock = $this->getMockBuilder(
'ilObjectLP')
33 ->disableOriginalConstructor()
34 ->setMethods(array(
'getCollectionInstance'))
37 $collectionInstance->method(
'getPossibleItems')
38 ->willReturn(array(0 => array(
'title' =>
'Some SCORM Title')));
40 $learningProgressMock->method(
'getCollectionInstance')
41 ->willReturn($collectionInstance);
43 $userDefinePlaceholderMock = $this->getMockBuilder(
'ilUserDefinedFieldsPlaceholderDescription')
44 ->disableOriginalConstructor()
47 $userDefinePlaceholderMock->method(
'createPlaceholderHtmlDescription')
48 ->willReturn(array());
50 $userDefinePlaceholderMock->method(
'getPlaceholderDescriptions')
51 ->willReturn(array());
57 $learningProgressMock,
58 $userDefinePlaceholderMock
61 $html = $placeholderDescriptionObject->createPlaceholderHtmlDescription($templateMock);
63 $this->assertEquals(
'',
$html);
68 $objectMock = $this->getMockBuilder(
'ilObject')
69 ->disableOriginalConstructor()
70 ->setMethods(array(
'txt'))
73 $languageMock = $this->getMockBuilder(
'ilLanguage')
74 ->disableOriginalConstructor()
75 ->setMethods(array(
'txt'))
78 $languageMock->expects($this->exactly(21))
80 ->willReturn(
'Something translated');
82 $learningProgressMock = $this->getMockBuilder(
'ilObjectLP')
83 ->disableOriginalConstructor()
84 ->setMethods(array(
'getCollectionInstance'))
87 $userDefinePlaceholderMock = $this->getMockBuilder(
'ilUserDefinedFieldsPlaceholderDescription')
88 ->disableOriginalConstructor()
91 $userDefinePlaceholderMock->method(
'createPlaceholderHtmlDescription')
92 ->willReturn(array());
94 $userDefinePlaceholderMock->method(
'getPlaceholderDescriptions')
95 ->willReturn(array());
101 $learningProgressMock,
102 $userDefinePlaceholderMock
105 $placeHolders = $placeholderDescriptionObject->getPlaceholderDescriptions();
109 'USER_LOGIN' =>
'Something translated',
110 'USER_FULLNAME' =>
'Something translated',
111 'USER_FIRSTNAME' =>
'Something translated',
112 'USER_LASTNAME' =>
'Something translated',
113 'USER_TITLE' =>
'Something translated',
114 'USER_SALUTATION' =>
'Something translated',
115 'USER_BIRTHDAY' =>
'Something translated',
116 'USER_INSTITUTION' =>
'Something translated',
117 'USER_DEPARTMENT' =>
'Something translated',
118 'USER_STREET' =>
'Something translated',
119 'USER_CITY' =>
'Something translated',
120 'USER_ZIPCODE' =>
'Something translated',
121 'USER_COUNTRY' =>
'Something translated',
122 'USER_MATRICULATION' =>
'Something translated',
123 'DATE' =>
'Something translated',
124 'DATETIME' =>
'Something translated',
125 'SCORM_TITLE' =>
'Something translated',
126 'SCORM_POINTS' =>
'Something translated',
127 'SCORM_POINTS_MAX' =>
'Something translated',
128 'DATE_COMPLETED' =>
'Something translated',
129 'DATETIME_COMPLETED' =>
'Something translated'
testPlaceholderDescriptions()
testPlaceholderGetHtmlDescription()