X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fsrc%2FCore%2FConfig%2FCache%2FConfigCacheTest.php;h=1ee2a3f80270aa78c673936f74d9bc20fe6db418;hb=b06fc578804fdc0073631e7c97eccd25543e769e;hp=ac9fae540b8c45ab89eb0c977d28408b21955f6b;hpb=256e845c5dd606d6e0f1d401a0859b6f8728fb2d;p=friendica.git diff --git a/tests/src/Core/Config/Cache/ConfigCacheTest.php b/tests/src/Core/Config/Cache/ConfigCacheTest.php index ac9fae540b..1ee2a3f802 100644 --- a/tests/src/Core/Config/Cache/ConfigCacheTest.php +++ b/tests/src/Core/Config/Cache/ConfigCacheTest.php @@ -1,6 +1,6 @@ assertEquals('!!', $configCache->get('something', 'value')); - } - - /** - * Test the has() method - */ - public function testHas() - { - $configCache = new ConfigCache(); - - $this->assertFalse($configCache->has('system', 'test')); - $this->assertFalse($configCache->has('system')); - - $configCache->set('system', 'test', 'it'); - $this->assertTrue($configCache->has('system', 'test')); - $this->assertTrue($configCache->has('system')); + $this->assertNull($configCache->get('something', 'value')); } /** @@ -171,8 +156,6 @@ class ConfigCacheTest extends MockedTest ], ]); - $this->assertTrue($configCache->has('system')); - $this->assertEquals([ 'key1' => 'value1', 'key2' => 'value2', @@ -233,8 +216,6 @@ class ConfigCacheTest extends MockedTest ], ]); - $this->assertTrue($configCache->hasP($uid,'system')); - $this->assertEquals([ 'key1' => 'value1', 'key2' => 'value2', @@ -264,20 +245,4 @@ class ConfigCacheTest extends MockedTest $this->assertEmpty($configCache->getAll()); } - - /** - * Test the hasP() method - */ - public function testHasP() - { - $configCache = new ConfigCache(); - $uid = 345; - - $this->assertFalse($configCache->hasP($uid, 'system', 'test')); - $this->assertFalse($configCache->hasP($uid, 'system')); - - $configCache->setP($uid, 'system', 'test', 'it'); - $this->assertTrue($configCache->hasP($uid, 'system', 'test')); - $this->assertTrue($configCache->hasP($uid, 'system')); - } }