<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
namespace Friendica\Test\src\Core\Cache;
+use Friendica\Core\Cache\ICache;
+use Friendica\Core\Cache\IMemoryCache;
use Friendica\Test\MockedTest;
use Friendica\Util\PidFile;
protected $startTime = 1417011228;
/**
- * @var \Friendica\Core\Cache\ICache
+ * @var ICache
*/
protected $instance;
/**
- * @var \Friendica\Core\Cache\IMemoryCache
+ * @var IMemoryCache
*/
protected $cache;
abstract protected function getInstance();
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
* @param mixed $value1 a first
* @param mixed $value2 a second
*/
- function testSimple($value1, $value2)
+ public function testSimple($value1, $value2)
{
self::assertNull($this->instance->get('value1'));
* @param mixed $value3 a third
* @param mixed $value4 a fourth
*/
- function testClear($value1, $value2, $value3, $value4)
+ public function testClear($value1, $value2, $value3, $value4)
{
- $value = 'ipsum lorum';
$this->instance->set('1_value1', $value1);
$this->instance->set('1_value2', $value2);
$this->instance->set('2_value1', $value3);
/**
* @medium
*/
- function testTTL()
+ public function testTTL()
{
- $this->markTestSkipped('taking too much time without mocking');
+ static::markTestSkipped('taking too much time without mocking');
self::assertNull($this->instance->get('value1'));
/**
* @small
*
- * @param $data mixed the data to store in the cache
+ * @param mixed $data the data to store in the cache
*
* @dataProvider dataTypesInCache
*/
- function testDifferentTypesInCache($data)
+ public function testDifferentTypesInCache($data)
{
$this->instance->set('val', $data);
$received = $this->instance->get('val');