From e07c6559a9d1bdac676f00e2c290cb2c99e1a7e0 Mon Sep 17 00:00:00 2001 From: troosan Date: Thu, 19 Jul 2018 00:52:22 +0200 Subject: [PATCH] adapt test --- tests/PhpWord/TemplateProcessorTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/PhpWord/TemplateProcessorTest.php b/tests/PhpWord/TemplateProcessorTest.php index 770428cb..ea739561 100644 --- a/tests/PhpWord/TemplateProcessorTest.php +++ b/tests/PhpWord/TemplateProcessorTest.php @@ -260,6 +260,7 @@ final class TemplateProcessorTest extends \PHPUnit\Framework\TestCase // and the placeholders have been replaced correctly $phpWord = IOFactory::load($templatePath); $sections = $phpWord->getSections(); + /** @var \PhpOffice\PhpWord\Element\TextRun[] $actualElements */ $actualElements = $sections[0]->getElements(); unlink($templatePath); $expectedElements = array( @@ -271,7 +272,7 @@ final class TemplateProcessorTest extends \PHPUnit\Framework\TestCase foreach ($expectedElements as $i => $expectedElement) { $this->assertEquals( $expectedElement, - $actualElements[$i]->getText() + $actualElements[$i]->getElement(0)->getText() ); } }