◆ testReplace()
| ilCertificateValueReplacementTest::testReplace |
( |
| ) |
|
Definition at line 26 of file ilCertificateValueReplacementTest.php.
26 : void
27 {
29
30 $placeholderValues = ['NAME' => 'Peter', 'PRIZE' => 'a fantastic prize'];
31
32 $certificateContent = '<xml>
33[BACKGROUND_IMAGE]
34Hurray [NAME] you have received [PRIZE]
35</xml>';
36
37 $replacedContent = $replacement->replace($placeholderValues, $certificateContent);
38
39 $expected = '<xml>
40[BACKGROUND_IMAGE]
41Hurray Peter you have received a fantastic prize
42</xml>';
43
44 $this->assertSame($expected, $replacedContent);
45 }
◆ testReplaceClientWebDir()
| ilCertificateValueReplacementTest::testReplaceClientWebDir |
( |
| ) |
|
Definition at line 47 of file ilCertificateValueReplacementTest.php.
47 : void
48 {
50
51 $placeholderValues = ['NAME' => 'Peter', 'PRIZE' => 'a fantastic prize'];
52
53 $certificateContent = '<xml>
54[BACKGROUND_IMAGE]
55[CLIENT_WEB_DIR]/background.jpg
56Hurray [NAME] you have received [PRIZE]
57</xml>';
58
59 $replacedContent = $replacement->replace($placeholderValues, $certificateContent);
60
61 $expected = '<xml>
62[BACKGROUND_IMAGE]
63[CLIENT_WEB_DIR]/background.jpg
64Hurray Peter you have received a fantastic prize
65</xml>';
66
67 $this->assertSame($expected, $replacedContent);
68 }
The documentation for this class was generated from the following file: