Added string type-hint for get() and a test case for it
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user