MoveFromCacheTraitTest.php 1014 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * Copyright (c) 2016 Robin Appelman <icewind@owncloud.com>
  4. * This file is licensed under the Affero General Public License version 3 or
  5. * later.
  6. * See the COPYING-README file.
  7. */
  8. namespace Test\Files\Cache;
  9. use OC\Files\Cache\MoveFromCacheTrait;
  10. use OCP\Files\Cache\ICacheEntry;
  11. class FallBackCrossCacheMoveCache extends \OC\Files\Cache\Cache {
  12. use MoveFromCacheTrait;
  13. }
  14. /**
  15. * Class MoveFromCacheTraitTest
  16. *
  17. * @group DB
  18. */
  19. class MoveFromCacheTraitTest extends CacheTest {
  20. protected function setUp(): void {
  21. parent::setUp();
  22. $this->storage = new \OC\Files\Storage\Temporary([]);
  23. $this->storage2 = new \OC\Files\Storage\Temporary([]);
  24. $this->cache = new FallBackCrossCacheMoveCache($this->storage);
  25. $this->cache2 = new FallBackCrossCacheMoveCache($this->storage2);
  26. $this->cache->insert('', ['size' => 0, 'mtime' => 0, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]);
  27. $this->cache2->insert('', ['size' => 0, 'mtime' => 0, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]);
  28. }
  29. }