Fix some test error

This commit is contained in:
Ivan Lanin 2014-04-03 09:20:21 +07:00
parent 637c9fce6f
commit 1ebd26ddc6
3 changed files with 3 additions and 13 deletions

View File

@ -11,6 +11,7 @@ namespace PhpOffice\PhpWord\Element;
use PhpOffice\PhpWord\Element\Row; use PhpOffice\PhpWord\Element\Row;
use PhpOffice\PhpWord\Style\Table as TableStyle; use PhpOffice\PhpWord\Style\Table as TableStyle;
/** /**
* Table element * Table element
*/ */

View File

@ -1237,9 +1237,9 @@ class Base extends WriterPart
$xmlWriter->startElement('w:' . $sides[$i]); $xmlWriter->startElement('w:' . $sides[$i]);
if (!empty($colors)) { if (!empty($colors)) {
if (is_null($colors[$i]) && !empty($attributes)) { if (is_null($colors[$i]) && !empty($attributes)) {
if (array_key_exists('defaultColor', $attributes)) if (array_key_exists('defaultColor', $attributes)) {
$colors[$i] = $attributes['defaultColor']; $colors[$i] = $attributes['defaultColor'];
}
} }
$xmlWriter->writeAttribute('w:val', 'single'); $xmlWriter->writeAttribute('w:val', 'single');
$xmlWriter->writeAttribute('w:sz', $sizes[$i]); $xmlWriter->writeAttribute('w:sz', $sizes[$i]);

View File

@ -42,17 +42,6 @@ class CellTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($oCell->getWidth(), null); $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 * Add text
*/ */