0
0
Fork 0
mirror of https://github.com/kevinpapst/kimai2.git synced 2025-01-10 19:47:35 +00:00
kevinpapst_kimai2/tests/Configuration/TestConfigLoader.php
Kevin Papst ca846b5fbf
2.0 RC 1 - new ConfigurationService (#3810)
* use html5 email validation
* remove static cache seed, for compatibility with non default (file based) caches
* added caching ConfigurationService, removed use of doctrine result cache
* simplify configuration API
2023-02-05 19:51:08 +01:00

42 lines
901 B
PHP

<?php
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Tests\Configuration;
use App\Configuration\ConfigLoaderInterface;
use App\Entity\Configuration;
/**
* @covers \App\Configuration\SystemConfiguration
*/
class TestConfigLoader implements ConfigLoaderInterface
{
/**
* @var array<string, string|null>
*/
private array $configs = [];
/**
* @param Configuration[] $configs
*/
public function __construct(array $configs)
{
foreach ($configs as $config) {
$this->configs[$config->getName()] = $config->getValue();
}
}
/**
* @return array<string, string|null>
*/
public function getConfigurations(): array
{
return $this->configs;
}
}