public function unlink($path) { $path = $this->initPath($path); try { self::$dropbox->delete($path); } catch (Dropbox_Exception $e) { return false; } return true; }
/** * @param \Dropbox_API $dropbox */ function it_does_not_delete_file($dropbox) { $dropbox->delete('filename')->willThrow(new \Dropbox_Exception_NotFound()); $this->delete('filename')->shouldReturn(false); }