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