Add "getName()" test

This commit is contained in:
Philipp 2023-07-26 21:43:03 +02:00
parent 9f18222a06
commit bbfec06a3d
No known key found for this signature in database
GPG Key ID: 24A7501396EB5432

View File

@ -23,6 +23,7 @@ namespace Friendica\Test\src\Core\Cache;
use Friendica\Core\Cache\Capability\ICanCache; use Friendica\Core\Cache\Capability\ICanCache;
use Friendica\Core\Cache\Capability\ICanCacheInMemory; use Friendica\Core\Cache\Capability\ICanCacheInMemory;
use Friendica\Core\Cache\Type\AbstractCache;
use Friendica\Test\MockedTest; use Friendica\Test\MockedTest;
use Friendica\Util\PidFile; use Friendica\Util\PidFile;
@ -246,4 +247,13 @@ abstract class CacheTest extends MockedTest
self::assertTrue($this->instance->set('key space', 'value')); self::assertTrue($this->instance->set('key space', 'value'));
self::assertEquals('value', $this->instance->get('key space')); self::assertEquals('value', $this->instance->get('key space'));
} }
public function testGetName()
{
if (property_exists($this->instance, '$NAME')) {
self::assertEquals($this->instance::$NAME, $this->instance->getName());
} else {
self::expectNotToPerformAssertions();
}
}
} }