Footnote fix
This commit is contained in:
parent
b11cd40bba
commit
cd3f74e572
|
|
@ -138,6 +138,13 @@ class PHPWord_Writer_Word2007_ContentTypes extends PHPWord_Writer_Word2007_Write
|
|||
'application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml'
|
||||
);
|
||||
|
||||
// Footnotes
|
||||
$this->_writeOverrideContentType(
|
||||
$objWriter,
|
||||
'/word/footnotes.xml',
|
||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml'
|
||||
);
|
||||
|
||||
for ($i = 1; $i <= $_cHdrs; $i++) {
|
||||
$this->_writeOverrideContentType(
|
||||
$objWriter,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
namespace PHPWord\Tests\Writer\Word2007;
|
||||
|
||||
use PHPWord;
|
||||
use PHPWord\Tests\TestHelperDOCX;
|
||||
|
||||
/**
|
||||
* Class PHPWord_Writer_Word2007_FootnotesTest
|
||||
* @package PHPWord\Tests
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
class FootnotesTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* Executed before each method of the class
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
TestHelperDOCX::clear();
|
||||
}
|
||||
|
||||
public function testWriteFootnotes()
|
||||
{
|
||||
$PHPWord = new PHPWord();
|
||||
$section = $PHPWord->createSection();
|
||||
$section->addText('Text');
|
||||
$footnote = $section->createFootnote();
|
||||
$footnote->addText('Footnote');
|
||||
$footnote->addLink('http://google.com');
|
||||
$doc = TestHelperDOCX::getDocument($PHPWord);
|
||||
|
||||
$this->assertEquals(1, 1);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue