Fix some test error
This commit is contained in:
parent
637c9fce6f
commit
1ebd26ddc6
|
|
@ -11,6 +11,7 @@ namespace PhpOffice\PhpWord\Element;
|
|||
|
||||
use PhpOffice\PhpWord\Element\Row;
|
||||
use PhpOffice\PhpWord\Style\Table as TableStyle;
|
||||
|
||||
/**
|
||||
* Table element
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1237,9 +1237,9 @@ class Base extends WriterPart
|
|||
$xmlWriter->startElement('w:' . $sides[$i]);
|
||||
if (!empty($colors)) {
|
||||
if (is_null($colors[$i]) && !empty($attributes)) {
|
||||
if (array_key_exists('defaultColor', $attributes))
|
||||
if (array_key_exists('defaultColor', $attributes)) {
|
||||
$colors[$i] = $attributes['defaultColor'];
|
||||
|
||||
}
|
||||
}
|
||||
$xmlWriter->writeAttribute('w:val', 'single');
|
||||
$xmlWriter->writeAttribute('w:sz', $sizes[$i]);
|
||||
|
|
|
|||
|
|
@ -42,17 +42,6 @@ class CellTest extends \PHPUnit_Framework_TestCase
|
|||
$this->assertEquals($oCell->getWidth(), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* New instance with string
|
||||
*/
|
||||
public function testConstructWithStyleString()
|
||||
{
|
||||
$iVal = rand(1, 1000);
|
||||
$oCell = new Cell('section', $iVal, null, 'cellStyle');
|
||||
|
||||
$this->assertEquals($oCell->getStyle(), 'cellStyle');
|
||||
}
|
||||
|
||||
/**
|
||||
* Add text
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue