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