0
0
mirror of https://github.com/nextcloud/server.git synced 2024-12-29 16:38:28 +00:00
nextcloud_server/tests/lib/Files/ObjectStore/ObjectStoreStorageOverwrite.php
Andy Scherzinger 1f7e2ba599
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-13 17:41:36 +02:00

30 lines
710 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace Test\Files\ObjectStore;
use OC\Files\ObjectStore\ObjectStoreStorage;
use OCP\Files\ObjectStore\IObjectStore;
/**
* Allow overwriting the object store instance for test purposes
*/
class ObjectStoreStorageOverwrite extends ObjectStoreStorage {
public function setObjectStore(IObjectStore $objectStore): void {
$this->objectStore = $objectStore;
}
public function getObjectStore(): IObjectStore {
return $this->objectStore;
}
public function setValidateWrites(bool $validate): void {
$this->validateWrites = $validate;
}
}