2016-01-27 09:45:19 -05:00
|
|
|
<?php
|
2025-06-30 09:04:05 -04:00
|
|
|
|
2016-01-27 09:45:19 -05:00
|
|
|
/**
|
2024-05-10 09:09:14 -04:00
|
|
|
* SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2016-01-27 09:45:19 -05:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
namespace Test\Files\Cache;
|
|
|
|
|
|
2025-06-12 12:31:58 -04:00
|
|
|
use OC\Files\Cache\Cache;
|
2016-01-27 09:45:19 -05:00
|
|
|
use OC\Files\Cache\MoveFromCacheTrait;
|
2025-06-12 12:31:58 -04:00
|
|
|
use OC\Files\Storage\Temporary;
|
2024-09-18 07:54:37 -04:00
|
|
|
use OCP\Files\Cache\ICacheEntry;
|
2016-01-27 09:45:19 -05:00
|
|
|
|
2025-06-12 12:31:58 -04:00
|
|
|
class FallBackCrossCacheMoveCache extends Cache {
|
2016-01-27 09:45:19 -05:00
|
|
|
use MoveFromCacheTrait;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2016-05-20 09:38:20 -04:00
|
|
|
* Class MoveFromCacheTraitTest
|
2016-01-27 09:45:19 -05:00
|
|
|
*/
|
2025-10-20 19:52:40 -04:00
|
|
|
#[\PHPUnit\Framework\Attributes\Group('DB')]
|
2016-05-20 09:38:20 -04:00
|
|
|
class MoveFromCacheTraitTest extends CacheTest {
|
2019-11-21 10:40:38 -05:00
|
|
|
protected function setUp(): void {
|
2016-01-27 09:45:19 -05:00
|
|
|
parent::setUp();
|
|
|
|
|
|
2025-06-12 12:31:58 -04:00
|
|
|
$this->storage = new Temporary([]);
|
|
|
|
|
$this->storage2 = new Temporary([]);
|
2016-01-27 09:45:19 -05:00
|
|
|
$this->cache = new FallBackCrossCacheMoveCache($this->storage);
|
|
|
|
|
$this->cache2 = new FallBackCrossCacheMoveCache($this->storage2);
|
2024-09-18 07:54:37 -04:00
|
|
|
|
|
|
|
|
$this->cache->insert('', ['size' => 0, 'mtime' => 0, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]);
|
|
|
|
|
$this->cache2->insert('', ['size' => 0, 'mtime' => 0, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]);
|
2016-01-27 09:45:19 -05:00
|
|
|
}
|
|
|
|
|
}
|