diff --git a/tests/PhpWord/TemplateProcessorTest.php b/tests/PhpWord/TemplateProcessorTest.php index 187e5686..28ade1a3 100644 --- a/tests/PhpWord/TemplateProcessorTest.php +++ b/tests/PhpWord/TemplateProcessorTest.php @@ -248,7 +248,8 @@ final class TemplateProcessorTest extends \PHPUnit\Framework\TestCase $templatePath = 'test.docx'; $objWriter->save($templatePath); - $variableCount = (new TemplateProcessor($templatePath))->getVariableCount(); + $templateProcessor = new TemplateProcessor($templatePath); + $variableCount = $templateProcessor->getVariableCount(); unlink($templatePath); $this->assertEquals(