womtfix/negative-werte #12
@@ -17,13 +17,15 @@ class WorkingHoursViewTest extends Unit
|
|||||||
*/
|
*/
|
||||||
public function workingHoursProvider(): array
|
public function workingHoursProvider(): array
|
||||||
{
|
{
|
||||||
|
$date = new DateTime('2020-11-30');
|
||||||
|
$work_days = 15;
|
||||||
|
$total_hours = new DateInterval("PT32H22M");
|
||||||
|
$overtime = new DateInterval("PT22M");
|
||||||
|
$absence_time = clone $overtime;
|
||||||
|
$absence_time->invert = 1;
|
||||||
return [
|
return [
|
||||||
[
|
[
|
||||||
new DateTime('2020-11-30'),
|
$date, PeriodDesignationEnum::WEEKLY(), $work_days, $total_hours, $overtime,
|
||||||
PeriodDesignationEnum::WEEKLY(),
|
|
||||||
15,
|
|
||||||
new DateInterval("PT32H22M"),
|
|
||||||
new DateInterval("PT22M"),
|
|
||||||
[
|
[
|
||||||
'period' => '2020#49',
|
'period' => '2020#49',
|
||||||
'periodDesignation' => 'weekly',
|
'periodDesignation' => 'weekly',
|
||||||
@@ -33,11 +35,17 @@ class WorkingHoursViewTest extends Unit
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
new DateTime('2020-11-30'),
|
$date, PeriodDesignationEnum::WEEKLY(), $work_days, $total_hours, $absence_time,
|
||||||
PeriodDesignationEnum::MONTHLY(),
|
[
|
||||||
15,
|
'period' => '2020#49',
|
||||||
new DateInterval("PT32H22M"),
|
'periodDesignation' => 'weekly',
|
||||||
new DateInterval("PT22M"),
|
'workingDays' => 15,
|
||||||
|
'totalHours' => '32:22:00',
|
||||||
|
'overtime' => '-00:22:00'
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
$date, PeriodDesignationEnum::MONTHLY(), $work_days, $total_hours, $overtime,
|
||||||
[
|
[
|
||||||
'period' => '2020-11',
|
'period' => '2020-11',
|
||||||
'periodDesignation' => 'monthly',
|
'periodDesignation' => 'monthly',
|
||||||
@@ -47,12 +55,17 @@ class WorkingHoursViewTest extends Unit
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
new DateTime('2020-11-30'),
|
$date, PeriodDesignationEnum::MONTHLY(), $work_days, $total_hours, $absence_time,
|
||||||
PeriodDesignationEnum::YEARLY(),
|
|
||||||
15,
|
|
||||||
new DateInterval("PT32H22M"),
|
|
||||||
new DateInterval("PT22M"),
|
|
||||||
[
|
[
|
||||||
|
'period' => '2020-11',
|
||||||
|
'periodDesignation' => 'monthly',
|
||||||
|
'workingDays' => 15,
|
||||||
|
'totalHours' => '32:22:00',
|
||||||
|
'overtime' => '-00:22:00'
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
$date, PeriodDesignationEnum::YEARLY(), $work_days, $total_hours, $overtime, [
|
||||||
'period' => '2020',
|
'period' => '2020',
|
||||||
'periodDesignation' => 'yearly',
|
'periodDesignation' => 'yearly',
|
||||||
'workingDays' => 15,
|
'workingDays' => 15,
|
||||||
@@ -60,6 +73,15 @@ class WorkingHoursViewTest extends Unit
|
|||||||
'overtime' => '00:22:00'
|
'overtime' => '00:22:00'
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
$date, PeriodDesignationEnum::YEARLY(), $work_days, $total_hours, $absence_time, [
|
||||||
|
'period' => '2020',
|
||||||
|
'periodDesignation' => 'yearly',
|
||||||
|
'workingDays' => 15,
|
||||||
|
'totalHours' => '32:22:00',
|
||||||
|
'overtime' => '-00:22:00'
|
||||||
|
],
|
||||||
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user