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

testAnimation() public method

public testAnimation ( )
    public function testAnimation()
    {
        $oPhpPresentation = new PhpPresentation();
        $oSlide = $oPhpPresentation->getActiveSlide();
        $oShape1 = $oSlide->createRichTextShape();
        $oShape2 = $oSlide->createRichTextShape();
        $oAnimation = new Animation();
        $oAnimation->addShape($oShape1);
        $oAnimation->addShape($oShape2);
        $oSlide->addAnimation($oAnimation);
        $oXMLDoc = TestHelperDOCX::getDocument($oPhpPresentation, 'PowerPoint2007');
        $element = '/p:sld/p:timing';
        $this->assertTrue($oXMLDoc->elementExists($element, 'ppt/slides/slide1.xml'));
        $element = '/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par';
        $this->assertTrue($oXMLDoc->elementExists($element, 'ppt/slides/slide1.xml'));
        $element = '/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par';
        $this->assertTrue($oXMLDoc->elementExists($element, 'ppt/slides/slide1.xml'));
    }