]> git.mxchange.org Git - friendica.git/commitdiff
Add "getName()" test
authorPhilipp <admin@philipp.info>
Wed, 26 Jul 2023 19:43:03 +0000 (21:43 +0200)
committerPhilipp <admin@philipp.info>
Wed, 26 Jul 2023 19:44:31 +0000 (21:44 +0200)
tests/src/Core/Cache/CacheTest.php

index 615a1095d542fb83080870cda8de1f72f7533416..dbcc56e228781dfeb84dee4328490af85224aeb6 100644 (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();
+               }
+       }
 }