Add "getName()" test

This commit is contained in:
Philipp Holzer 2023-07-26 21:43:03 +02:00
parent 9f18222a06
commit bbfec06a3d
Signed by: nupplaPhil
GPG Key ID: 24A7501396EB5432
1 changed files with 10 additions and 0 deletions

View File

@ -23,6 +23,7 @@ namespace Friendica\Test\src\Core\Cache;
use Friendica\Core\Cache\Capability\ICanCache;
use Friendica\Core\Cache\Capability\ICanCacheInMemory;
use Friendica\Core\Cache\Type\AbstractCache;
use Friendica\Test\MockedTest;
use Friendica\Util\PidFile;
@ -246,4 +247,13 @@ abstract class CacheTest extends MockedTest
self::assertTrue($this->instance->set('key space', 'value'));
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();
}
}
}