19 declare(strict_types=1);
27 $placeholderValues = [
'NAME' =>
'Peter',
'PRIZE' =>
'a fantastic prize'];
29 $certificateContent =
'<xml> 31 Hurray [NAME] you have received [PRIZE] 34 $replacedContent = $replacement->replace($placeholderValues, $certificateContent);
38 Hurray Peter you have received a fantastic prize 41 $this->assertSame($expected, $replacedContent);
48 $placeholderValues = [
'NAME' =>
'Peter',
'PRIZE' =>
'a fantastic prize'];
50 $certificateContent =
'<xml> 52 [CLIENT_WEB_DIR]/background.jpg 53 Hurray [NAME] you have received [PRIZE] 56 $replacedContent = $replacement->replace($placeholderValues, $certificateContent);
60 [CLIENT_WEB_DIR]/background.jpg 61 Hurray Peter you have received a fantastic prize 64 $this->assertSame($expected, $replacedContent);
testReplaceClientWebDir()