addAnimation() public method

Add an animation to the slide
public addAnimation ( $animation ) : Slide
return Slide
Example #1
0
 public function testAnimations()
 {
     $oStub = $this->getMockForAbstractClass('PhpOffice\\PhpPresentation\\Slide\\Animation');
     $object = new Slide();
     $this->assertInternalType('array', $object->getAnimations());
     $this->assertCount(0, $object->getAnimations());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Slide', $object->addAnimation($oStub));
     $this->assertInternalType('array', $object->getAnimations());
     $this->assertCount(1, $object->getAnimations());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Slide', $object->setAnimations());
     $this->assertInternalType('array', $object->getAnimations());
     $this->assertCount(0, $object->getAnimations());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Slide', $object->setAnimations(array($oStub)));
     $this->assertInternalType('array', $object->getAnimations());
     $this->assertCount(1, $object->getAnimations());
 }