add tests

This commit is contained in:
Philipp Holzer 2019-03-30 18:57:54 +01:00
parent e0b1f4f251
commit 24f5a8c3a1
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5

View file

@ -245,4 +245,34 @@ class ConfigCacheTest extends MockedTest
$this->assertEmpty($configCache->getAll());
}
/**
* Test the keyDiff() method with result
* @dataProvider dataTests
*/
public function testKeyDiffWithResult($data)
{
$configCache = new ConfigCache($data);
$diffConfig = [
'fakeCat' => [
'fakeKey' => 'value',
]
];
$this->assertEquals($diffConfig, $configCache->keyDiff($diffConfig));
}
/**
* Test the keyDiff() method without result
* @dataProvider dataTests
*/
public function testKeyDiffWithoutResult($data)
{
$configCache = new ConfigCache($data);
$diffConfig = $configCache->getAll();
$this->assertEmpty($configCache->keyDiff($diffConfig));
}
}