ObjectStoreStoragesSameBucketTest.php 883 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace Test\Files\ObjectStore;
  8. use OC\Files\ObjectStore\StorageObjectStore;
  9. use OC\Files\Storage\Temporary;
  10. use Test\Files\Storage\StoragesTest;
  11. /**
  12. * @group DB
  13. */
  14. class ObjectStoreStoragesSameBucketTest extends StoragesTest {
  15. /**
  16. * @var \OCP\Files\ObjectStore\IObjectStore
  17. */
  18. private $objectStore;
  19. protected function setUp(): void {
  20. parent::setUp();
  21. $baseStorage = new Temporary();
  22. $this->objectStore = new StorageObjectStore($baseStorage);
  23. $config['objectstore'] = $this->objectStore;
  24. // storage1 and storage2 share the same object store.
  25. $this->storage1 = new ObjectStoreStorageOverwrite($config);
  26. $this->storage2 = new ObjectStoreStorageOverwrite($config);
  27. }
  28. }