PhpOffice\PhpPresentation\Tests\Writer\PowerPoint2007\SlideTest::testFillSolidTable PHP Method

testFillSolidTable() public method

public testFillSolidTable ( )
    public function testFillSolidTable()
    {
        $expected = 'E06B20';
        $oPhpPresentation = new PhpPresentation();
        $oSlide = $oPhpPresentation->getActiveSlide();
        $oShape = $oSlide->createTableShape(1);
        $oShape->setHeight(200)->setWidth(600)->setOffsetX(150)->setOffsetY(300);
        $oRow = $oShape->createRow();
        $oCell = $oRow->getCell();
        $oCell->createTextRun('R1C1');
        $oFill = $oCell->getFill();
        $oFill->setFillType(Fill::FILL_SOLID)->setStartColor(new Color('FF' . $expected));
        $pres = TestHelperDOCX::getDocument($oPhpPresentation, 'PowerPoint2007');
        $element = '/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/a:tbl/a:tr/a:tc/a:tcPr/a:solidFill/a:srgbClr';
        $this->assertTrue($pres->elementExists($element, 'ppt/slides/slide1.xml'));
        $this->assertEquals($expected, $pres->getElementAttribute($element, 'val', 'ppt/slides/slide1.xml'));
    }