setPath() public method

Set Path
public setPath ( string $pValue = '' ) : PhpOffice\PhpPresentation\Shape\Drawing
$pValue string File path
return PhpOffice\PhpPresentation\Shape\Drawing
Ejemplo n.º 1
0
 /**
  * @expectedException \Exception
  * @expectedExceptionMessage does not exist
  */
 public function testDrawingZipException()
 {
     $oPhpPresentation = new PhpPresentation();
     $oSlide = $oPhpPresentation->getActiveSlide();
     $oDrawing = new Drawing\ZipFile();
     $oDrawing->setPath('zip://' . PHPPRESENTATION_TESTS_BASE_DIR . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'files' . DIRECTORY_SEPARATOR . 'filedoesntexist.zip#secondpath', false);
     $oSlide->addShape($oDrawing);
     TestHelperDOCX::getDocument($oPhpPresentation, 'PowerPoint2007');
 }
Ejemplo n.º 2
0
 public function testMimeType()
 {
     $oDrawing = new ZipFile();
     $oDrawing->setPath($this->fileOk);
     $this->assertEquals('image/gif', $oDrawing->getMimeType());
 }