1
0
mirror of https://github.com/e107inc/e107.git synced 2025-10-12 21:45:11 +02:00
Files
php-e107/lib/config.php
Nick Liu 3a0dd50e7c Improved flexibility of codeception.yml
- MOD: Reduced code duplication in ./lib/config.php
- MOD: Replaced PHP 7.1 samples with PHP 7.2 samples in README.md
- NEW: ./config.sample.yml now supports customized database dumps, which
       affects the Codeception database populator
- NEW: Code coverage reports now take into account the configured
       `app_path`, which obviates a separate codeception.sample.yml file
       and reduces the complexity in setting up this test harness

@CaMer0n and @SimSync: I'm aware that you previously needed a separate
codeception.yml file because the coverage reports didn't use the
`app_path` from `config.yml`. This has been fixed. I'd like to keep just
one place for custom configurations (config.yml) so that we can keep
tests reproducible and avoid inconsistencies if/when codeception.yml
gets updated in the future.
2018-08-06 07:25:05 -05:00

19 lines
378 B
PHP

<?php
use Symfony\Component\Yaml\Yaml;
$params = [];
foreach ([
'config.sample.yml',
'config.yml',
'config.local.yml'
] as $config_filename)
{
$absolute_config_path = codecept_root_dir() . '/' . $config_filename;
if (file_exists($absolute_config_path))
$params = array_merge($params, Yaml::parse(file_get_contents($absolute_config_path)));
}
return $params;