configs: overwrite via prepend, mode instead of duration_only (#715)

This commit is contained in:
Kevin Papst
2019-04-26 16:14:28 +02:00
committed by GitHub
parent f0f757cf75
commit 32f0d80729
24 changed files with 253 additions and 45 deletions

View File

@@ -37,7 +37,7 @@ class TimesheetConfigurationTest extends TestCase
'rules' => [
'allow_future_times' => false,
],
'duration_only' => true,
'mode' => 'duration_only',
'markdown_content' => false,
'active_entries' => [
'hard_limit' => 99,
@@ -50,7 +50,7 @@ class TimesheetConfigurationTest extends TestCase
{
return [
(new Configuration())->setName('timesheet.rules.allow_future_times')->setValue('1'),
(new Configuration())->setName('timesheet.duration_only')->setValue('0'),
(new Configuration())->setName('timesheet.mode')->setValue('default'),
(new Configuration())->setName('timesheet.markdown_content')->setValue('1'),
(new Configuration())->setName('timesheet.active_entries.hard_limit')->setValue('7'),
(new Configuration())->setName('timesheet.active_entries.soft_limit')->setValue('3'),
@@ -86,7 +86,7 @@ class TimesheetConfigurationTest extends TestCase
public function testDefaultWithMixedConfigs()
{
$sut = $this->getSut($this->getDefaultSettings(), [
(new Configuration())->setName('timesheet.duration_only')->setValue(''),
(new Configuration())->setName('timesheet.mode')->setValue('sdf'),
]);
$this->assertEquals(false, $sut->isDurationOnly());
}