aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Memcache/MemcachedTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Memcache/MemcachedTest.php')
-rw-r--r--tests/lib/Memcache/MemcachedTest.php21
1 files changed, 13 insertions, 8 deletions
diff --git a/tests/lib/Memcache/MemcachedTest.php b/tests/lib/Memcache/MemcachedTest.php
index caebf50cd6b..61e2f42e3d6 100644
--- a/tests/lib/Memcache/MemcachedTest.php
+++ b/tests/lib/Memcache/MemcachedTest.php
@@ -1,22 +1,27 @@
<?php
/**
- * Copyright (c) 2013 Robin Appelman <icewind@owncloud.com>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace Test\Memcache;
+use OC\Memcache\Memcached;
+
+/**
+ * @group Memcache
+ * @group Memcached
+ */
class MemcachedTest extends Cache {
public static function setUpBeforeClass(): void {
parent::setUpBeforeClass();
- if (!\OC\Memcache\Memcached::isAvailable()) {
+ if (!Memcached::isAvailable()) {
self::markTestSkipped('The memcached extension is not available.');
}
- $instance = new \OC\Memcache\Memcached(self::getUniqueID());
+ $instance = new Memcached(self::getUniqueID());
if ($instance->set(self::getUniqueID(), self::getUniqueID()) === false) {
self::markTestSkipped('memcached server seems to be down.');
}
@@ -24,10 +29,10 @@ class MemcachedTest extends Cache {
protected function setUp(): void {
parent::setUp();
- $this->instance = new \OC\Memcache\Memcached($this->getUniqueID());
+ $this->instance = new Memcached($this->getUniqueID());
}
- public function testClear() {
+ public function testClear(): void {
// Memcached is sometimes broken with clear(), so we don't test it thoroughly
$value = 'ipsum lorum';
$this->instance->set('1_value1', $value);