X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2Fsrc%2FCore%2FConfig%2FPConfigurationTest.php;h=f2f1857a69b9667daed508d061f05b26bcd92a12;hb=7ce48d1b77e9a691b1f77ec01690175f6b27bda9;hp=0259944147a1c7670b15ab18cc3468fc1041eaca;hpb=f5adbd268b0ad6f9e090ebb44dc32a0d4a1fec3c;p=friendica.git diff --git a/tests/src/Core/Config/PConfigurationTest.php b/tests/src/Core/Config/PConfigurationTest.php index 0259944147..f2f1857a69 100644 --- a/tests/src/Core/Config/PConfigurationTest.php +++ b/tests/src/Core/Config/PConfigurationTest.php @@ -1,9 +1,9 @@ shouldReceive('isConnected')->andReturn(true)->twice(); // expected loading @@ -51,7 +51,7 @@ class PConfigurationTest extends MockedTest public function testCacheLoadDouble() { $uid = 234; - $configCache = new ConfigCache(); + $configCache = new PConfigCache(); $configAdapter = \Mockery::mock(IPConfigAdapter::class); $configAdapter->shouldReceive('isConnected')->andReturn(true)->times(4); // expected loading @@ -77,7 +77,7 @@ class PConfigurationTest extends MockedTest public function testSetGetWithoutDB($data) { $uid = 234; - $configCache = new ConfigCache(); + $configCache = new PConfigCache(); $configAdapter = \Mockery::mock(IPConfigAdapter::class); $configAdapter->shouldReceive('isConnected')->andReturn(false)->times(2); @@ -95,7 +95,7 @@ class PConfigurationTest extends MockedTest public function testSetGetWithDB($data) { $uid = 234; - $configCache = new ConfigCache(); + $configCache = new PConfigCache(); $configAdapter = \Mockery::mock(IPConfigAdapter::class); $configAdapter->shouldReceive('isConnected')->andReturn(true)->times(2); $configAdapter->shouldReceive('isLoaded')->with($uid, 'test', 'it')->andReturn(true)->once(); @@ -114,7 +114,7 @@ class PConfigurationTest extends MockedTest public function testGetWrongWithoutDB() { $uid = 234; - $configCache = new ConfigCache(); + $configCache = new PConfigCache(); $configAdapter = \Mockery::mock(IPConfigAdapter::class); $configAdapter->shouldReceive('isConnected')->andReturn(false)->times(3); @@ -137,7 +137,7 @@ class PConfigurationTest extends MockedTest public function testGetWithRefresh($data) { $uid = 234; - $configCache = new ConfigCache(); + $configCache = new PConfigCache(); $configAdapter = \Mockery::mock(IPConfigAdapter::class); $configAdapter->shouldReceive('isConnected')->andReturn(true)->times(4); $configAdapter->shouldReceive('isLoaded')->with($uid, 'test', 'it')->andReturn(false)->once(); @@ -145,7 +145,7 @@ class PConfigurationTest extends MockedTest $configAdapter->shouldReceive('isLoaded')->with($uid, 'test', 'it')->andReturn(true)->twice(); $configAdapter->shouldReceive('get')->with($uid, 'test', 'it')->andReturn($data)->once(); $configAdapter->shouldReceive('isLoaded')->with($uid, 'test', 'not')->andReturn(false)->once(); - $configAdapter->shouldReceive('get')->with($uid, 'test', 'not')->andReturn('!!')->once(); + $configAdapter->shouldReceive('get')->with($uid, 'test', 'not')->andReturn(null)->once(); $configuration = new PConfiguration($configCache, $configAdapter); @@ -168,12 +168,12 @@ class PConfigurationTest extends MockedTest public function testGetWithoutLoaded($data) { $uid = 234; - $configCache = new ConfigCache(); + $configCache = new PConfigCache(); $configAdapter = \Mockery::mock(IPConfigAdapter::class); $configAdapter->shouldReceive('isConnected')->andReturn(true)->times(3); $configAdapter->shouldReceive('isLoaded')->with($uid, 'test', 'it')->andReturn(false)->once(); - $configAdapter->shouldReceive('get')->with($uid, 'test', 'it')->andReturn('!!')->once(); + $configAdapter->shouldReceive('get')->with($uid, 'test', 'it')->andReturn(null)->once(); $configAdapter->shouldReceive('isLoaded')->with($uid, 'test', 'it')->andReturn(false)->once(); $configAdapter->shouldReceive('get')->with($uid, 'test', 'it')->andReturn($data)->once(); @@ -199,7 +199,7 @@ class PConfigurationTest extends MockedTest public function testDeleteWithoutDB($data) { $uid = 234; - $configCache = new ConfigCache(); + $configCache = new PConfigCache(); $configAdapter = \Mockery::mock(IPConfigAdapter::class); $configAdapter->shouldReceive('isConnected')->andReturn(false)->times(4); @@ -218,7 +218,7 @@ class PConfigurationTest extends MockedTest public function testDeleteWithDB() { $uid = 234; - $configCache = new ConfigCache(); + $configCache = new PConfigCache(); $configAdapter = \Mockery::mock(IPConfigAdapter::class); $configAdapter->shouldReceive('isConnected')->andReturn(true)->times(6); $configAdapter->shouldReceive('set')->with($uid, 'test', 'it', 'now')->andReturn(false)->once();