Added support for geolite_license_key config option

This commit is contained in:
Alejandro Celaya 2020-04-29 19:26:34 +02:00
parent af8b6b7f96
commit 9190996e54
2 changed files with 6 additions and 0 deletions

View File

@ -33,6 +33,7 @@ class SimplifiedConfigParser
'task_worker_num' => ['mezzio-swoole', 'swoole-http-server', 'options', 'task_worker_num'],
'visits_webhooks' => ['url_shortener', 'visits_webhooks'],
'default_short_codes_length' => ['url_shortener', 'default_short_codes_length'],
'geolite_license_key' => ['geolite2', 'license_key'],
];
private const SIMPLIFIED_CONFIG_SIDE_EFFECTS = [
'delete_short_url_threshold' => [

View File

@ -60,6 +60,7 @@ class SimplifiedConfigParserTest extends TestCase
'https://third-party.io/foo',
],
'default_short_codes_length' => 8,
'geolite_license_key' => 'kjh23ljkbndskj345',
];
$expected = [
'app_options' => [
@ -127,6 +128,10 @@ class SimplifiedConfigParserTest extends TestCase
],
],
],
'geolite2' => [
'license_key' => 'kjh23ljkbndskj345',
],
];
$result = ($this->postProcessor)(array_merge($config, $simplified));