]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Core/Config/Cache/ConfigCacheTest.php
Merge pull request #6704 from tobiasd/20190220-credits
[friendica.git] / tests / src / Core / Config / Cache / ConfigCacheTest.php
index ac9fae540b8c45ab89eb0c977d28408b21955f6b..1ee2a3f80270aa78c673936f74d9bc20fe6db418 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Friendica\Test\Core\Config\Cache;
+namespace Friendica\Test\src\Core\Config\Cache;
 
 use Friendica\Core\Config\Cache\ConfigCache;
 use Friendica\Test\MockedTest;
@@ -138,22 +138,7 @@ class ConfigCacheTest extends MockedTest
        {
                $configCache = new ConfigCache();
 
-               $this->assertEquals('!<unset>!', $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'));
-       }
 }