addSlide() public method

Add slide
public addSlide ( Slide $slide = null ) : Slide
$slide Slide
return Slide
Example #1
0
 /**
  */
 public function testMethod()
 {
     $oPhpPresentation = new PhpPresentation();
     $oPhpPresentation->addSlide(new Slide());
     $object = new Iterator($oPhpPresentation);
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Slide', $object->current());
     $this->assertEquals(0, $object->key());
     $this->assertNull($object->next());
     $this->assertEquals(1, $object->key());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Slide', $object->current());
     $this->assertTrue($object->valid());
     $this->assertNull($object->next());
     $this->assertFalse($object->valid());
     $this->assertNull($object->rewind());
     $this->assertEquals(0, $object->key());
 }