0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-05-19 20:52:07 +00:00
nextcloud_server/tests/lib/Files/ObjectStore/FailDeleteObjectStore.php

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
980 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace Test\Files\ObjectStore;
use OCP\Files\ObjectStore\IObjectStore;
class FailDeleteObjectStore implements IObjectStore {
private $objectStore;
public function __construct(IObjectStore $objectStore) {
$this->objectStore = $objectStore;
}
public function getStorageId() {
return $this->objectStore->getStorageId();
}
public function readObject($urn) {
return $this->objectStore->readObject($urn);
}
public function writeObject($urn, $stream, ?string $mimetype = null) {
return $this->objectStore->writeObject($urn, $stream, $mimetype);
}
public function deleteObject($urn) {
throw new \Exception();
}
public function objectExists($urn) {
return $this->objectStore->objectExists($urn);
}
public function copyObject($from, $to) {
$this->objectStore->copyObject($from, $to);
}
}