diff --git a/tests/PhpWord/TemplateProcessorTest.php b/tests/PhpWord/TemplateProcessorTest.php index ea739561..2b3a9fd1 100644 --- a/tests/PhpWord/TemplateProcessorTest.php +++ b/tests/PhpWord/TemplateProcessorTest.php @@ -276,4 +276,14 @@ final class TemplateProcessorTest extends \PHPUnit\Framework\TestCase ); } } + + public function testMainPartNameDetection() + { + $templatePath = 'templates/document22-xml.docx'; + $templateProcessor = new TemplateProcessor($templatePath); + + $variables = array('test'); + + $this->assertEquals($variables, $templateProcessor->getVariables()); + } } diff --git a/tests/PhpWord/_files/templates/document22-xml.docx b/tests/PhpWord/_files/templates/document22-xml.docx new file mode 100644 index 00000000..206d80f4 Binary files /dev/null and b/tests/PhpWord/_files/templates/document22-xml.docx differ