Row objects and Cell styling
This commit introduces Row and Cell entities, that will replace the arrays passed in previously. It also adds support for Cell styling (instead of Row styling only).
This commit is contained in:
1 parent
fec27e9056
commit
7274226b75
32 files changed
+1113
-859
No files matched your search
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Spout\Writer\Common\Manager;
|
||||
|
||||
use Box\Spout\Writer\Common\Creator\Style\StyleBuilder;
|
||||
use Box\Spout\Writer\Common\Entity\Cell;
|
||||
use Box\Spout\Writer\Common\Manager\CellManager;
|
||||
use Box\Spout\Writer\Common\Manager\Style\StyleMerger;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class CellManagerTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testApplyStyle()
|
||||
{
|
||||
$cellManager = new CellManager(new StyleMerger());
|
||||
$cell = new Cell('test');
|
||||
|
||||
$this->assertFalse($cell->getStyle()->isFontBold());
|
||||
|
||||
$style = (new StyleBuilder())->setFontBold()->build();
|
||||
$cellManager->applyStyle($cell, $style);
|
||||
|
||||
$this->assertTrue($cell->getStyle()->isFontBold());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user