Skip to content

Commit 8ba5bfd

Browse files
committed
improve code coverage
1 parent ef40717 commit 8ba5bfd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/PhpWord/TemplateProcessorTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ public function testSetImageValue()
252252
$testFileName = 'images-test-sample.docx';
253253
$phpWord = new \PhpOffice\PhpWord\PhpWord();
254254
$section = $phpWord->addSection();
255-
$section->addText('${Test} --- ${Test}');
255+
$section->addText('${Test:width=100:ratio=true}');
256256
$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'Word2007');
257257
$objWriter->save($testFileName);
258258
$this->assertFileExists($testFileName, "Generated file '{$testFileName}' not found!");
@@ -261,6 +261,8 @@ public function testSetImageValue()
261261
$templateProcessor = new \PhpOffice\PhpWord\TemplateProcessor($testFileName);
262262
unlink($testFileName);
263263
$templateProcessor->setImageValue('Test', $imagePath);
264+
$templateProcessor->setImageValue('Test1', $imagePath);
265+
$templateProcessor->setImageValue('Test2', $imagePath);
264266
$templateProcessor->saveAs($resultFileName);
265267
$this->assertFileExists($resultFileName, "Generated file '{$resultFileName}' not found!");
266268

0 commit comments

Comments
 (0)