adapt test
This commit is contained in:
parent
affccc7937
commit
e07c6559a9
|
|
@ -260,6 +260,7 @@ final class TemplateProcessorTest extends \PHPUnit\Framework\TestCase
|
||||||
// and the placeholders have been replaced correctly
|
// and the placeholders have been replaced correctly
|
||||||
$phpWord = IOFactory::load($templatePath);
|
$phpWord = IOFactory::load($templatePath);
|
||||||
$sections = $phpWord->getSections();
|
$sections = $phpWord->getSections();
|
||||||
|
/** @var \PhpOffice\PhpWord\Element\TextRun[] $actualElements */
|
||||||
$actualElements = $sections[0]->getElements();
|
$actualElements = $sections[0]->getElements();
|
||||||
unlink($templatePath);
|
unlink($templatePath);
|
||||||
$expectedElements = array(
|
$expectedElements = array(
|
||||||
|
|
@ -271,7 +272,7 @@ final class TemplateProcessorTest extends \PHPUnit\Framework\TestCase
|
||||||
foreach ($expectedElements as $i => $expectedElement) {
|
foreach ($expectedElements as $i => $expectedElement) {
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
$expectedElement,
|
$expectedElement,
|
||||||
$actualElements[$i]->getText()
|
$actualElements[$i]->getElement(0)->getText()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue