history = new EmployeeEducationHistory(); } #[\PHPUnit\Framework\Attributes\Group('module')] public function testDefault() : void { self::assertEquals(0, $this->history->id); self::assertNull($this->history->end); self::assertEquals(0, $this->history->employee); self::assertEquals('', $this->history->educationTitle); self::assertTrue($this->history->passed); self::assertEquals('', $this->history->score); self::assertInstanceOf('\DateTime', $this->history->start); self::assertInstanceOf('\phpOMS\Stdlib\Base\Address', $this->history->address); } #[\PHPUnit\Framework\Attributes\Group('module')] public function testSerialize() : void { $this->history->employee = 2; $this->history->educationTitle = 'title'; $this->history->score = '69'; $this->history->passed = false; $serialized = $this->history->jsonSerialize(); unset($serialized['start']); self::assertEquals( [ 'id' => 0, 'employee' => 2, 'educationTitle' => 'title', 'passed' => false, 'score' => '69', 'end' => null, ], $serialized ); } }