Added string type-hint for get() and a test case for it

This commit is contained in:
Philipp Holzer
2019-07-14 23:23:20 +02:00
parent aa249adf6d
commit 4af08d82b2
4 changed files with 14 additions and 2 deletions

View File

@@ -157,6 +157,12 @@ class ConfigCacheTest extends MockedTest
'key1' => 'value1',
'key2' => 'value2',
], $configCache->get('system'));
// explicit null as key
$this->assertEquals([
'key1' => 'value1',
'key2' => 'value2',
], $configCache->get('system', null));
}
/**

View File

@@ -79,6 +79,12 @@ class PConfigCacheTest extends MockedTest
'key1' => 'value1',
'key2' => 'value2',
], $configCache->get($uid, 'system'));
// test explicit cat with null as key
$this->assertEquals([
'key1' => 'value1',
'key2' => 'value2',
], $configCache->get($uid, 'system', null));
}
/**