2020-04-09 05:50:14 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
2018-12-12 09:24:40 -05:00
|
|
|
/**
|
2024-05-10 09:09:14 -04:00
|
|
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2018-12-12 09:24:40 -05:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
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 {
|
2023-10-20 03:08:08 -04:00
|
|
|
public function setObjectStore(IObjectStore $objectStore): void {
|
2018-12-12 09:24:40 -05:00
|
|
|
$this->objectStore = $objectStore;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getObjectStore(): IObjectStore {
|
|
|
|
|
return $this->objectStore;
|
|
|
|
|
}
|
2022-08-04 06:32:46 -04:00
|
|
|
|
2023-10-20 03:08:08 -04:00
|
|
|
public function setValidateWrites(bool $validate): void {
|
2022-08-04 06:32:46 -04:00
|
|
|
$this->validateWrites = $validate;
|
|
|
|
|
}
|
2018-12-12 09:24:40 -05:00
|
|
|
}
|