1
0

MoveFromCacheTraitTest.php 1006 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2019-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\Cache;
  8. use OC\Files\Cache\MoveFromCacheTrait;
  9. use OCP\Files\Cache\ICacheEntry;
  10. class FallBackCrossCacheMoveCache extends \OC\Files\Cache\Cache {
  11. use MoveFromCacheTrait;
  12. }
  13. /**
  14. * Class MoveFromCacheTraitTest
  15. *
  16. * @group DB
  17. */
  18. class MoveFromCacheTraitTest extends CacheTest {
  19. protected function setUp(): void {
  20. parent::setUp();
  21. $this->storage = new \OC\Files\Storage\Temporary([]);
  22. $this->storage2 = new \OC\Files\Storage\Temporary([]);
  23. $this->cache = new FallBackCrossCacheMoveCache($this->storage);
  24. $this->cache2 = new FallBackCrossCacheMoveCache($this->storage2);
  25. $this->cache->insert('', ['size' => 0, 'mtime' => 0, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]);
  26. $this->cache2->insert('', ['size' => 0, 'mtime' => 0, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]);
  27. }
  28. }