Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests/lib
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-06-29 16:34:06 +0300
committerCarl Schwan <carl@carlschwan.eu>2022-07-14 16:54:31 +0300
commitd5c23dbb9fed1a1b958e07ebdb7202c37bddc074 (patch)
treecd650f88e9597500a6ed9dc680e67641274d5c5b /tests/lib
parentd3f66e2310ef790794aba81f12d7ab6a035736c3 (diff)
Move CappedMemoryCache to OCPfeat/capped-memorycache-ocp
This is an helpful helper that should be used in more place than just server and this is already the case with groupfodlers, deck, user_oidc and more using it, so let's make it public Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/App/InfoParserTest.php6
-rw-r--r--tests/lib/Cache/CappedMemoryCacheTest.php4
-rw-r--r--tests/lib/Files/Config/UserMountCacheTest.php2
-rw-r--r--tests/lib/Files/Node/RootTest.php2
-rw-r--r--tests/lib/Files/ViewTest.php2
5 files changed, 8 insertions, 8 deletions
diff --git a/tests/lib/App/InfoParserTest.php b/tests/lib/App/InfoParserTest.php
index 8de0f4cfd4f..bc561611501 100644
--- a/tests/lib/App/InfoParserTest.php
+++ b/tests/lib/App/InfoParserTest.php
@@ -11,16 +11,16 @@ namespace Test\App;
use OC;
use OC\App\InfoParser;
use Test\TestCase;
+use OCP\Cache\CappedMemoryCache;
class InfoParserTest extends TestCase {
- /** @var OC\Cache\CappedMemoryCache */
+ /** @var OCP\Cache\CappedMemoryCache */
private static $cache;
public static function setUpBeforeClass(): void {
- self::$cache = new OC\Cache\CappedMemoryCache();
+ self::$cache = new CappedMemoryCache();
}
-
public function parserTest($expectedJson, $xmlFile, $cache = null) {
$parser = new InfoParser($cache);
diff --git a/tests/lib/Cache/CappedMemoryCacheTest.php b/tests/lib/Cache/CappedMemoryCacheTest.php
index db0d2bd1193..b9d10b66100 100644
--- a/tests/lib/Cache/CappedMemoryCacheTest.php
+++ b/tests/lib/Cache/CappedMemoryCacheTest.php
@@ -30,11 +30,11 @@ namespace Test\Cache;
class CappedMemoryCacheTest extends TestCache {
protected function setUp(): void {
parent::setUp();
- $this->instance = new \OC\Cache\CappedMemoryCache();
+ $this->instance = new \OCP\Cache\CappedMemoryCache();
}
public function testSetOverCap() {
- $instance = new \OC\Cache\CappedMemoryCache(3);
+ $instance = new \OCP\Cache\CappedMemoryCache(3);
$instance->set('1', 'a');
$instance->set('2', 'b');
diff --git a/tests/lib/Files/Config/UserMountCacheTest.php b/tests/lib/Files/Config/UserMountCacheTest.php
index 221159bc983..8b26b309daa 100644
--- a/tests/lib/Files/Config/UserMountCacheTest.php
+++ b/tests/lib/Files/Config/UserMountCacheTest.php
@@ -11,7 +11,7 @@ namespace Test\Files\Config;
use OC\DB\QueryBuilder\Literal;
use OC\Files\Mount\MountPoint;
use OC\Files\Storage\Storage;
-use OC\Cache\CappedMemoryCache;
+use OCP\Cache\CappedMemoryCache;
use OC\User\Manager;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Config\ICachedMountInfo;
diff --git a/tests/lib/Files/Node/RootTest.php b/tests/lib/Files/Node/RootTest.php
index ee86eab5675..5d8e2a4ac62 100644
--- a/tests/lib/Files/Node/RootTest.php
+++ b/tests/lib/Files/Node/RootTest.php
@@ -8,7 +8,7 @@
namespace Test\Files\Node;
-use OC\Cache\CappedMemoryCache;
+use OCP\Cache\CappedMemoryCache;
use OC\Files\FileInfo;
use OC\Files\Mount\Manager;
use OC\Files\Node\Folder;
diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php
index 37cd8414a05..86101d79a1e 100644
--- a/tests/lib/Files/ViewTest.php
+++ b/tests/lib/Files/ViewTest.php
@@ -7,7 +7,7 @@
namespace Test\Files;
-use OC\Cache\CappedMemoryCache;
+use OCP\Cache\CappedMemoryCache;
use OC\Files\Cache\Watcher;
use OC\Files\Filesystem;
use OC\Files\Mount\MountPoint;