◆ testReplace()
ilCertificateValueReplacementTest::testReplace |
( |
| ) |
|
Definition at line 9 of file ilCertificateValueReplacementTest.php.
10 {
12
13 $placeholderValues = array('NAME' => 'Peter', 'PRIZE' => 'a fantastic prize');
14
15 $certificateContent = '<xml>
16[BACKGROUND_IMAGE]
17Hurray [NAME] you have received [PRIZE]
18</xml>';
19
20 $replacedContent = $replacement->replace($placeholderValues, $certificateContent);
21
22 $expected = '<xml>
23[BACKGROUND_IMAGE]
24Hurray Peter you have received a fantastic prize
25</xml>';
26
27 $this->assertEquals($expected, $replacedContent);
28 }
◆ testReplaceClientWebDir()
ilCertificateValueReplacementTest::testReplaceClientWebDir |
( |
| ) |
|
Definition at line 30 of file ilCertificateValueReplacementTest.php.
31 {
33
34 $placeholderValues = array('NAME' => 'Peter', 'PRIZE' => 'a fantastic prize');
35
36 $certificateContent = '<xml>
37[BACKGROUND_IMAGE]
38[CLIENT_WEB_DIR]/background.jpg
39Hurray [NAME] you have received [PRIZE]
40</xml>';
41
42 $replacedContent = $replacement->replace($placeholderValues, $certificateContent);
43
44 $expected = '<xml>
45[BACKGROUND_IMAGE]
46[CLIENT_WEB_DIR]/background.jpg
47Hurray Peter you have received a fantastic prize
48</xml>';
49
50 $this->assertEquals($expected, $replacedContent);
51 }
The documentation for this class was generated from the following file: