首页 > 代码库 > 【待解决】20170725_phpword(phpoffice)———TemplateProcessor->applyXslStyleSheet()
【待解决】20170725_phpword(phpoffice)———TemplateProcessor->applyXslStyleSheet()
/** * XSL stylesheet can be applied. * * @test * @covers ::applyXslStyleSheet * @depends testTemplateCanBeSavedInTemporaryLocation * * @param string $actualDocumentFqfn * * @throws \Exception */ final public function testXslStyleSheetCanBeApplied($actualDocumentFqfn) { $expectedDocumentFqfn = __DIR__ . ‘/_files/documents/without_table_macros.docx‘; $actualDocumentZip = new \ZipArchive(); $actualDocumentZip->open($actualDocumentFqfn); $actualHeaderXml = $actualDocumentZip->getFromName(‘word/header1.xml‘); $actualMainPartXml = $actualDocumentZip->getFromName(‘word/document.xml‘); $actualFooterXml = $actualDocumentZip->getFromName(‘word/footer1.xml‘); if (false === $actualDocumentZip->close()) { throw new \Exception("Could not close zip file \"{$actualDocumentFqfn}\"."); } $expectedDocumentZip = new \ZipArchive(); $expectedDocumentZip->open($expectedDocumentFqfn); $expectedHeaderXml = $expectedDocumentZip->getFromName(‘word/header1.xml‘); $expectedMainPartXml = $expectedDocumentZip->getFromName(‘word/document.xml‘); $expectedFooterXml = $expectedDocumentZip->getFromName(‘word/footer1.xml‘); if (false === $expectedDocumentZip->close()) { throw new \Exception("Could not close zip file \"{$expectedDocumentFqfn}\"."); } $this->assertXmlStringEqualsXmlString($expectedHeaderXml, $actualHeaderXml); $this->assertXmlStringEqualsXmlString($expectedMainPartXml, $actualMainPartXml); $this->assertXmlStringEqualsXmlString($expectedFooterXml, $actualFooterXml); }
【待解决】20170725_phpword(phpoffice)———TemplateProcessor->applyXslStyleSheet()
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。