/** * Test create new instance */ public function testConstruct() { $oPhpPresentation = new PhpPresentation(); $oPhpPresentation->getActiveSlide()->createDrawingShape(); $object = new ODPresentation($oPhpPresentation); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PhpPresentation', $object->getPhpPresentation()); $this->assertEquals('./', $object->getDiskCachingDirectory()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\HashTable', $object->getDrawingHashTable()); }
/** * Test create new instance */ public function testConstruct() { $objectPrefix = 'PhpOffice\\PhpPresentation\\Writer\\ODPresentation\\'; $parts = array('content' => 'Content', 'manifest' => 'Manifest', 'meta' => 'Meta', 'mimetype' => 'Mimetype', 'styles' => 'Styles', 'drawing' => 'Drawing'); $oPhpPresentation = new PhpPresentation(); $oPhpPresentation->getActiveSlide()->createDrawingShape(); $object = new ODPresentation($oPhpPresentation); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PhpPresentation', $object->getPhpPresentation()); $this->assertEquals('./', $object->getDiskCachingDirectory()); foreach ($parts as $partName => $objectName) { $this->assertInstanceOf($objectPrefix . $objectName, $object->getWriterPart($partName)); } $this->assertInstanceOf('PhpOffice\\PhpPresentation\\HashTable', $object->getDrawingHashTable()); }