/** * Test class construction * * There are 3 variables for class constructor: * - $styleTable: Define table styles * - $styleFirstRow: Define style for the first row */ public function testConstruct() { $styleTable = array('bgColor' => 'FF0000'); $styleFirstRow = array('borderBottomSize' => 3); $object = new Table($styleTable, $styleFirstRow); $this->assertEquals('FF0000', $object->getBgColor()); $firstRow = $object->getFirstRow(); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Table', $firstRow); $this->assertEquals(3, $firstRow->getBorderBottomSize()); }