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

testTableWithRowspan() public method

    public function testTableWithRowspan()
    {
        $oPhpPresentation = new PhpPresentation();
        $oSlide = $oPhpPresentation->getActiveSlide();
        $oShape = $oSlide->createTableShape(4);
        $oShape->setHeight(200)->setWidth(600)->setOffsetX(150)->setOffsetY(300);
        $oRow = $oShape->createRow();
        $oCell = $oRow->getCell();
        $oCell->createTextRun('AAA');
        $oCell->setRowSpan(2);
        $oRow = $oShape->createRow();
        $oRow = $oShape->createRow();
        $oCell = $oRow->getCell();
        $oCell->createTextRun('BBB');
        $pres = TestHelperDOCX::getDocument($oPhpPresentation, 'PowerPoint2007');
        $element = '/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/a:tbl/a:tr/a:tc';
        $this->assertTrue($pres->elementExists($element . '[@rowSpan="2"]', 'ppt/slides/slide1.xml'));
        $this->assertTrue($pres->elementExists($element . '[@vMerge="1"]', 'ppt/slides/slide1.xml'));
    }