aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Cache/TestCache.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Cache/TestCache.php')
-rw-r--r--tests/lib/Cache/TestCache.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/lib/Cache/TestCache.php b/tests/lib/Cache/TestCache.php
index 1dd9761682d..ec150152816 100644
--- a/tests/lib/Cache/TestCache.php
+++ b/tests/lib/Cache/TestCache.php
@@ -1,16 +1,18 @@
<?php
+
/**
- * Copyright (c) 2012 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: 2017-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace Test\Cache;
+use OCP\ICache;
+
abstract class TestCache extends \Test\TestCase {
/**
- * @var \OCP\ICache cache;
+ * @var ICache cache;
*/
protected $instance;
@@ -22,10 +24,10 @@ abstract class TestCache extends \Test\TestCase {
parent::tearDown();
}
- public function testSimple() {
+ public function testSimple(): void {
$this->assertNull($this->instance->get('value1'));
$this->assertFalse($this->instance->hasKey('value1'));
-
+
$value = 'foobar';
$this->instance->set('value1', $value);
$this->assertTrue($this->instance->hasKey('value1'));
@@ -51,7 +53,7 @@ abstract class TestCache extends \Test\TestCase {
$this->assertFalse($this->instance->hasKey('value1'));
}
- public function testClear() {
+ public function testClear(): void {
$value = 'ipsum lorum';
$this->instance->set('1_value1', $value . '1');
$this->instance->set('1_value2', $value . '2');