X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2Fsrc%2FCore%2FConfig%2FConfigurationTest.php;h=b07f9e6302bd0fa1f5ff8c19a5fb3f86a0de8bcd;hb=b06fc578804fdc0073631e7c97eccd25543e769e;hp=2e4fcd4f58db9d90a8bcb0671eb24cb9a1469e9d;hpb=74edf9994fca81be56ea893a449add5e61357e25;p=friendica.git diff --git a/tests/src/Core/Config/ConfigurationTest.php b/tests/src/Core/Config/ConfigurationTest.php index 2e4fcd4f58..b07f9e6302 100644 --- a/tests/src/Core/Config/ConfigurationTest.php +++ b/tests/src/Core/Config/ConfigurationTest.php @@ -1,6 +1,6 @@ assertNull($configuration->get('test', 'it')); /// beware that the cache returns '!!' and not null for a non existing value - $this->assertEquals('!!', $configuration->getCache()->get('test', 'it')); + $this->assertNull($configuration->getCache()->get('test', 'it')); // with default value $this->assertEquals('default', $configuration->get('test', 'it', 'default')); @@ -165,7 +165,7 @@ class ConfigurationTest extends MockedTest $configAdapter->shouldReceive('isLoaded')->with('test', 'it')->andReturn(true)->twice(); $configAdapter->shouldReceive('get')->with('test', 'it')->andReturn($data)->once(); $configAdapter->shouldReceive('isLoaded')->with('test', 'not')->andReturn(false)->once(); - $configAdapter->shouldReceive('get')->with('test', 'not')->andReturn('!!')->once(); + $configAdapter->shouldReceive('get')->with('test', 'not')->andReturn(null)->once(); $configuration = new Configuration($configCache, $configAdapter); @@ -179,7 +179,7 @@ class ConfigurationTest extends MockedTest // without refresh and wrong value and default $this->assertEquals('default', $configuration->get('test', 'not', 'default')); - $this->assertEquals('!!', $configuration->getCache()->get('test', 'not')); + $this->assertNull($configuration->getCache()->get('test', 'not')); } /** @@ -195,7 +195,7 @@ class ConfigurationTest extends MockedTest $configAdapter->shouldReceive('load')->andReturn([])->once(); $configAdapter->shouldReceive('isLoaded')->with('test', 'it')->andReturn(false)->once(); - $configAdapter->shouldReceive('get')->with('test', 'it')->andReturn('!!')->once(); + $configAdapter->shouldReceive('get')->with('test', 'it')->andReturn(null)->once(); $configAdapter->shouldReceive('isLoaded')->with('test', 'it')->andReturn(false)->once(); $configAdapter->shouldReceive('get')->with('test', 'it')->andReturn($data)->once(); @@ -234,7 +234,7 @@ class ConfigurationTest extends MockedTest $this->assertTrue($configuration->delete('test', 'it')); $this->assertNull($configuration->get('test', 'it')); - $this->assertEquals('!!', $configuration->getCache()->get('test', 'it')); + $this->assertNull($configuration->getCache()->get('test', 'it')); $this->assertEmpty($configuration->getCache()->getAll()); }