PhpPresentation\Tests\Writer\PowerPoint2007\PptChartsTest::testTypePie3DExplosion PHP Method

testTypePie3DExplosion() public method

    public function testTypePie3DExplosion()
    {
        $value = rand(1, 100);
        $oSlide = $this->oPresentation->getActiveSlide();
        $oShape = $oSlide->createChartShape();
        $oShape->setResizeProportional(false)->setHeight(550)->setWidth(700)->setOffsetX(120)->setOffsetY(80);
        $oPie3D = new Pie3D();
        $oPie3D->setExplosion($value);
        $oSeries = new Series('Downloads', $this->seriesData);
        $oPie3D->addSeries($oSeries);
        $oShape->getPlotArea()->setType($oPie3D);
        $oXMLDoc = TestHelperDOCX::getDocument($this->oPresentation, 'PowerPoint2007');
        $element = '/c:chartSpace/c:chart/c:plotArea/c:pie3DChart/c:ser/c:explosion';
        $this->assertTrue($oXMLDoc->elementExists($element, 'ppt/charts/' . $oShape->getIndexedFilename()));
        $this->assertEquals($value, $oXMLDoc->getElementAttribute($element, 'val', 'ppt/charts/' . $oShape->getIndexedFilename()));
    }