From b1774dd6b22a4b8b348e1dcff2e0ffb8277abb61 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Mon, 16 Oct 2023 23:39:39 +0000 Subject: [PATCH] Add test cases for null models --- tests/Models/NullSupplierTest.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/Models/NullSupplierTest.php b/tests/Models/NullSupplierTest.php index bbf7686..7793291 100755 --- a/tests/Models/NullSupplierTest.php +++ b/tests/Models/NullSupplierTest.php @@ -23,7 +23,7 @@ final class NullSupplierTest extends \PHPUnit\Framework\TestCase { /** * @covers Modules\SupplierManagement\Models\NullSupplier - * @group framework + * @group module */ public function testNull() : void { @@ -32,11 +32,21 @@ final class NullSupplierTest extends \PHPUnit\Framework\TestCase /** * @covers Modules\SupplierManagement\Models\NullSupplier - * @group framework + * @group module */ public function testId() : void { $null = new NullSupplier(2); self::assertEquals(2, $null->id); } + + /** + * @covers Modules\SupplierManagement\Models\NullSupplier + * @group module + */ + public function testJsonSerialize() : void + { + $null = new NullSupplier(2); + self::assertEquals(['id' => 2], $null); + } }