Fix unit test error
This commit is contained in:
parent
0ccea9620c
commit
38418677f8
|
|
@ -403,13 +403,14 @@ class Word2007 extends AbstractReader implements ReaderInterface
|
|||
$parent->addTextBreak(null, $pStyle);
|
||||
} else {
|
||||
if ($runLinkCount > 1) {
|
||||
$textContainer = &$parent->addTextRun($pStyle);
|
||||
$textrun = $parent->addTextRun($pStyle);
|
||||
$textParent = &$textrun;
|
||||
} else {
|
||||
$textContainer = &$parent;
|
||||
$textParent = &$parent;
|
||||
}
|
||||
$nodes = $xmlReader->getElements('*', $domNode);
|
||||
foreach ($nodes as $node) {
|
||||
$this->readRun($xmlReader, $node, $textContainer, $docPart, $pStyle);
|
||||
$this->readRun($xmlReader, $node, $textParent, $docPart, $pStyle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class StyleTest extends \PHPUnit_Framework_TestCase
|
|||
public function testStyles()
|
||||
{
|
||||
$paragraph = array('align' => 'center');
|
||||
$font = array('italic' => true);
|
||||
$font = array('italic' => true, '_bold' => true);
|
||||
$table = array('bgColor' => 'CCCCCC');
|
||||
$styles = array('Paragraph' => 'Paragraph', 'Font' => 'Font',
|
||||
'Link' => 'Font', 'Table' => 'Table',
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class TOCTest extends \PHPUnit_Framework_TestCase
|
|||
'tabLeader' => \PhpOffice\PhpWord\Style\TOC::TABLEADER_DOT,
|
||||
'indent' => 200,
|
||||
);
|
||||
$object = new TOC(array('size' => 11), array('tabPos' => $expected['tabPos']));
|
||||
$object = new TOC(array('_size' => 11), array('_tabPos' => $expected['tabPos']));
|
||||
$tocStyle = $object->getStyleTOC();
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\TOC', $tocStyle);
|
||||
|
|
|
|||
Loading…
Reference in New Issue