mirror of
https://github.com/Karaka-Management/oms-HumanResourceTimeRecording.git
synced 2026-02-15 04:08:40 +00:00
fix tests
This commit is contained in:
parent
fa314c610a
commit
314ccee8fd
|
|
@ -16,6 +16,7 @@ namespace Modules\HumanResourceTimeRecording\tests\Models;
|
||||||
|
|
||||||
use Modules\HumanResourceTimeRecording\Models\ClockingStatus;
|
use Modules\HumanResourceTimeRecording\Models\ClockingStatus;
|
||||||
use Modules\HumanResourceTimeRecording\Models\ClockingType;
|
use Modules\HumanResourceTimeRecording\Models\ClockingType;
|
||||||
|
use Modules\HumanResourceTimeRecording\Models\NullClockingType;
|
||||||
use Modules\HumanResourceTimeRecording\Models\Session;
|
use Modules\HumanResourceTimeRecording\Models\Session;
|
||||||
use Modules\HumanResourceTimeRecording\Models\SessionElement;
|
use Modules\HumanResourceTimeRecording\Models\SessionElement;
|
||||||
|
|
||||||
|
|
@ -114,7 +115,7 @@ final class SessionTest extends \PHPUnit\Framework\TestCase
|
||||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testSerialize() : void
|
public function testSerialize() : void
|
||||||
{
|
{
|
||||||
$this->session->type = ClockingType::VACATION;
|
$this->session->type = new NullClockingType();
|
||||||
|
|
||||||
$serialized = $this->session->jsonSerialize();
|
$serialized = $this->session->jsonSerialize();
|
||||||
unset($serialized['start']);
|
unset($serialized['start']);
|
||||||
|
|
@ -125,7 +126,7 @@ final class SessionTest extends \PHPUnit\Framework\TestCase
|
||||||
'id' => 0,
|
'id' => 0,
|
||||||
'end' => null,
|
'end' => null,
|
||||||
'busy' => 0,
|
'busy' => 0,
|
||||||
'type' => ClockingType::VACATION,
|
'type' => new NullClockingType(),
|
||||||
'elements' => [],
|
'elements' => [],
|
||||||
],
|
],
|
||||||
$serialized
|
$serialized
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user