13 $placeholderValues = array(
'NAME' =>
'Peter',
'PRIZE' =>
'a fantastic prize');
15 $certificateContent =
'<xml>
17Hurray [NAME] you have received [PRIZE]
20 $replacedContent = $replacement->replace($placeholderValues, $certificateContent);
24Hurray Peter you have received a fantastic prize
27 $this->assertEquals($expected, $replacedContent);
34 $placeholderValues = array(
'NAME' =>
'Peter',
'PRIZE' =>
'a fantastic prize');
36 $certificateContent =
'<xml>
38[CLIENT_WEB_DIR]/background.jpg
39Hurray [NAME] you have received [PRIZE]
42 $replacedContent = $replacement->replace($placeholderValues, $certificateContent);
46[CLIENT_WEB_DIR]/background.jpg
47Hurray Peter you have received a fantastic prize
50 $this->assertEquals($expected, $replacedContent);
An exception for terminatinating execution or to throw for unit testing.
testReplaceClientWebDir()