assertEmpty($object->getPath()); } /** * @expectedException \Exception * @expectedExceptionMessage File not found! */ public function testPathBasic() { $object = new File(); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Drawing\\File', $object->setPath()); } public function testPathWithoutVerifyFile() { $object = new File(); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Drawing\\File', $object->setPath('', false)); $this->assertEmpty($object->getPath()); } public function testPathWithRealFile() { $object = new File(); $imagePath = PHPPRESENTATION_TESTS_BASE_DIR.DIRECTORY_SEPARATOR.'resources'.DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.'PhpPresentationLogo.png'; $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Drawing\\File', $object->setPath($imagePath, false)); $this->assertEquals($imagePath, $object->getPath()); $this->assertEquals(0, $object->getWidth()); $this->assertEquals(0, $object->getHeight()); } }