19declare(strict_types=1);
30 $placeholderValues = [
'NAME' =>
'Peter',
'PRIZE' =>
'a fantastic prize'];
32 $certificateContent =
'<xml>
34Hurray [NAME] you have received [PRIZE]
37 $replacedContent = $replacement->replace($placeholderValues, $certificateContent);
41Hurray Peter you have received a fantastic prize
44 $this->assertSame($expected, $replacedContent);
51 $placeholderValues = [
'NAME' =>
'Peter',
'PRIZE' =>
'a fantastic prize'];
53 $certificateContent =
'<xml>
55[CLIENT_WEB_DIR]/background.jpg
56Hurray [NAME] you have received [PRIZE]
59 $replacedContent = $replacement->replace($placeholderValues, $certificateContent);
63[CLIENT_WEB_DIR]/background.jpg
64Hurray Peter you have received a fantastic prize
67 $this->assertSame($expected, $replacedContent);
Class ilCertificateBaseTestCase.
testReplaceClientWebDir()