From 0973c9f287678fc3bb3f3813f2e2128b988a580a Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Mon, 16 Oct 2023 23:39:38 +0000 Subject: [PATCH] Add test cases for null models --- tests/Models/NullEmployeeEducationHistoryTest.php | 14 ++++++++++++-- tests/Models/NullEmployeeHistoryTest.php | 14 ++++++++++++-- tests/Models/NullEmployeeTest.php | 14 ++++++++++++-- tests/Models/NullEmployeeWorkHistoryTest.php | 14 ++++++++++++-- 4 files changed, 48 insertions(+), 8 deletions(-) diff --git a/tests/Models/NullEmployeeEducationHistoryTest.php b/tests/Models/NullEmployeeEducationHistoryTest.php index 4d7c3c6..628ff66 100755 --- a/tests/Models/NullEmployeeEducationHistoryTest.php +++ b/tests/Models/NullEmployeeEducationHistoryTest.php @@ -23,7 +23,7 @@ final class NullEmployeeEducationHistoryTest extends \PHPUnit\Framework\TestCase { /** * @covers Modules\HumanResourceManagement\Models\NullEmployeeEducationHistory - * @group framework + * @group module */ public function testNull() : void { @@ -32,11 +32,21 @@ final class NullEmployeeEducationHistoryTest extends \PHPUnit\Framework\TestCase /** * @covers Modules\HumanResourceManagement\Models\NullEmployeeEducationHistory - * @group framework + * @group module */ public function testId() : void { $null = new NullEmployeeEducationHistory(2); self::assertEquals(2, $null->id); } + + /** + * @covers Modules\HumanResourceManagement\Models\NullEmployeeEducationHistory + * @group module + */ + public function testJsonSerialize() : void + { + $null = new NullEmployeeEducationHistory(2); + self::assertEquals(['id' => 2], $null); + } } diff --git a/tests/Models/NullEmployeeHistoryTest.php b/tests/Models/NullEmployeeHistoryTest.php index 2906ba7..f62b495 100755 --- a/tests/Models/NullEmployeeHistoryTest.php +++ b/tests/Models/NullEmployeeHistoryTest.php @@ -23,7 +23,7 @@ final class NullEmployeeHistoryTest extends \PHPUnit\Framework\TestCase { /** * @covers Modules\HumanResourceManagement\Models\NullEmployeeHistory - * @group framework + * @group module */ public function testNull() : void { @@ -32,11 +32,21 @@ final class NullEmployeeHistoryTest extends \PHPUnit\Framework\TestCase /** * @covers Modules\HumanResourceManagement\Models\NullEmployeeHistory - * @group framework + * @group module */ public function testId() : void { $null = new NullEmployeeHistory(2); self::assertEquals(2, $null->id); } + + /** + * @covers Modules\HumanResourceManagement\Models\NullEmployeeHistory + * @group module + */ + public function testJsonSerialize() : void + { + $null = new NullEmployeeHistory(2); + self::assertEquals(['id' => 2], $null); + } } diff --git a/tests/Models/NullEmployeeTest.php b/tests/Models/NullEmployeeTest.php index f6492c3..bc74c7e 100755 --- a/tests/Models/NullEmployeeTest.php +++ b/tests/Models/NullEmployeeTest.php @@ -23,7 +23,7 @@ final class NullEmployeeTest extends \PHPUnit\Framework\TestCase { /** * @covers Modules\HumanResourceManagement\Models\NullEmployee - * @group framework + * @group module */ public function testNull() : void { @@ -32,11 +32,21 @@ final class NullEmployeeTest extends \PHPUnit\Framework\TestCase /** * @covers Modules\HumanResourceManagement\Models\NullEmployee - * @group framework + * @group module */ public function testId() : void { $null = new NullEmployee(2); self::assertEquals(2, $null->id); } + + /** + * @covers Modules\HumanResourceManagement\Models\NullEmployee + * @group module + */ + public function testJsonSerialize() : void + { + $null = new NullEmployee(2); + self::assertEquals(['id' => 2], $null); + } } diff --git a/tests/Models/NullEmployeeWorkHistoryTest.php b/tests/Models/NullEmployeeWorkHistoryTest.php index 39ad219..6c44481 100755 --- a/tests/Models/NullEmployeeWorkHistoryTest.php +++ b/tests/Models/NullEmployeeWorkHistoryTest.php @@ -23,7 +23,7 @@ final class NullEmployeeWorkHistoryTest extends \PHPUnit\Framework\TestCase { /** * @covers Modules\HumanResourceManagement\Models\NullEmployeeWorkHistory - * @group framework + * @group module */ public function testNull() : void { @@ -32,11 +32,21 @@ final class NullEmployeeWorkHistoryTest extends \PHPUnit\Framework\TestCase /** * @covers Modules\HumanResourceManagement\Models\NullEmployeeWorkHistory - * @group framework + * @group module */ public function testId() : void { $null = new NullEmployeeWorkHistory(2); self::assertEquals(2, $null->id); } + + /** + * @covers Modules\HumanResourceManagement\Models\NullEmployeeWorkHistory + * @group module + */ + public function testJsonSerialize() : void + { + $null = new NullEmployeeWorkHistory(2); + self::assertEquals(['id' => 2], $null); + } }