improve configurations for usage in multi-environment setups (#1775)
This commit is contained in:
@@ -37,6 +37,7 @@ class AppExtensionTest extends TestCase
|
||||
{
|
||||
$container = new ContainerBuilder();
|
||||
$container->setParameter('app_locales', 'de|en|tr|zh_CN');
|
||||
$container->setParameter('kernel.project_dir', realpath(__DIR__ . '/../../'));
|
||||
|
||||
return $container;
|
||||
}
|
||||
@@ -55,7 +56,7 @@ class AppExtensionTest extends TestCase
|
||||
],
|
||||
],
|
||||
'data_dir' => '/tmp/',
|
||||
'plugin_dir' => '/tmp/',
|
||||
'plugin_dir' => '/tmp/', // still here, to make sure that this value is NOT applied!
|
||||
'timesheet' => [],
|
||||
'saml' => [
|
||||
'connection' => []
|
||||
@@ -72,7 +73,7 @@ class AppExtensionTest extends TestCase
|
||||
|
||||
$expected = [
|
||||
'kimai.data_dir' => '/tmp/',
|
||||
'kimai.plugin_dir' => '/tmp/',
|
||||
'kimai.plugin_dir' => realpath(__DIR__ . '/../../') . '/var/plugins',
|
||||
'kimai.languages' => [
|
||||
'en' => [
|
||||
'date_time_type' => 'yyyy-MM-dd HH:mm',
|
||||
|
||||
@@ -54,10 +54,12 @@ class ConfigurationTest extends TestCase
|
||||
|
||||
public function testValidatePluginDir()
|
||||
{
|
||||
$this->expectException(InvalidConfigurationException::class);
|
||||
$this->expectExceptionMessage('Invalid configuration for path "kimai.plugin_dir": Plugin directory does not exist');
|
||||
$finalizedConfig = $this->getCompiledConfig($this->getMinConfig());
|
||||
$finalizedConfig['plugin_dir'] = 'sdfsdfs';
|
||||
|
||||
$this->assertConfig($this->getMinConfig('/tmp/', 'sdfsdfs'), []);
|
||||
$config = $this->getMinConfig('/tmp/', 'sdfsdfs');
|
||||
|
||||
$this->assertConfig($config, $finalizedConfig);
|
||||
}
|
||||
|
||||
public function testValidateLdapConfigUserBaseDn()
|
||||
|
||||
Reference in New Issue
Block a user