public function testSaveOverwriting() { $oPhpPresentation = new PhpPresentation(); $oSlide = $oPhpPresentation->getActiveSlide(); $oImage = $oSlide->createDrawingShape(); $oImage->setPath(PHPPRESENTATION_TESTS_BASE_DIR . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . 'PhpPresentationLogo.png'); $object = new Serialized($oPhpPresentation); $file = tempnam(sys_get_temp_dir(), 'PhpPresentation_Serialized'); file_put_contents($file, rand(1, 100)); $this->assertFileExists($file, $object->save($file)); }