◆ testPlaceholderDescriptions()
ilCoursePlaceholderDescriptionTest::testPlaceholderDescriptions |
( |
| ) |
|
Definition at line 52 of file ilCoursePlaceholderDescriptionTest.php.
54 $languageMock = $this->getMockBuilder(
'ilLanguage')
55 ->disableOriginalConstructor()
56 ->onlyMethods([
'txt'])
59 $languageMock->expects($this->exactly(3))
61 ->willReturn(
'Something translated');
63 $defaultPlaceholder = $this->getMockBuilder(
'ilDefaultPlaceholderDescription')
64 ->disableOriginalConstructor()
67 $defaultPlaceholder->method(
'getPlaceholderDescriptions')
70 'SOMETHING' =>
'SOMEWHAT',
71 'SOMETHING_ELSE' =>
'ANYTHING' 75 $customUserPlaceholderObject = $this->getMockBuilder(
'ilObjectCustomUserFieldsPlaceholderDescription')
76 ->disableOriginalConstructor()
79 $customUserPlaceholderObject->method(
'getPlaceholderDescriptions')
82 '+SOMETHING' =>
'SOMEWHAT',
83 '+SOMETHING_ELSE' =>
'ANYTHING' 89 $placeHolders = $placeholderDescriptionObject->getPlaceholderDescriptions();
93 'COURSE_TITLE' =>
'Something translated',
94 'SOMETHING' =>
'SOMEWHAT',
95 'SOMETHING_ELSE' =>
'ANYTHING',
96 '+SOMETHING' =>
'SOMEWHAT',
97 '+SOMETHING_ELSE' =>
'ANYTHING',
98 'DATE_COMPLETED' =>
'Something translated',
99 'DATETIME_COMPLETED' =>
'Something translated'
◆ testPlaceholderGetHtmlDescription()
ilCoursePlaceholderDescriptionTest::testPlaceholderGetHtmlDescription |
( |
| ) |
|
Definition at line 8 of file ilCoursePlaceholderDescriptionTest.php.
10 $languageMock = $this->getMockBuilder(
'ilLanguage')
11 ->disableOriginalConstructor()
12 ->onlyMethods([
'txt',
'loadLanguageModule'])
15 $templateMock = $this->getMockBuilder(
'ilTemplate')
16 ->disableOriginalConstructor()
19 $templateMock->method(
'get')
22 $userDefinePlaceholderMock = $this->getMockBuilder(
'ilUserDefinedFieldsPlaceholderDescription')
23 ->disableOriginalConstructor()
26 $userDefinePlaceholderMock->method(
'createPlaceholderHtmlDescription')
29 $userDefinePlaceholderMock->method(
'getPlaceholderDescriptions')
32 $customUserPlaceholderObject = $this->getMockBuilder(
"ilObjectCustomUserFieldsPlaceholderDescription")
33 ->disableOriginalConstructor()
36 $customUserPlaceholderObject->method(
"getPlaceholderDescriptions")
38 '+SOMETHING' =>
'SOMEWHAT',
39 '+SOMETHING_ELSE' =>
'ANYTHING' 42 $customUserPlaceholderObject->method(
'createPlaceholderHtmlDescription')
45 $placeholderDescriptionObject =
new ilCoursePlaceholderDescription(200, null, $languageMock, $userDefinePlaceholderMock, $customUserPlaceholderObject);
47 $html = $placeholderDescriptionObject->createPlaceholderHtmlDescription($templateMock);
49 $this->assertEquals(
'', $html);
The documentation for this class was generated from the following file: