setAnimations() public method

Set collection of animations
public setAnimations ( array $array = [] ) : Slide
$array array
return Slide
コード例 #1
0
ファイル: SlideTest.php プロジェクト: phpoffice/phppowerpoint
 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());
 }