From 98a6d1a01471e6352b6b33209cdce5c5bb6f3de2 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/NullExchangeLogTest.php | 14 ++++++++++++-- tests/Models/NullExchangeSettingTest.php | 6 +++--- tests/Models/NullInterfaceManagerTest.php | 14 ++++++++++++-- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/tests/Models/NullExchangeLogTest.php b/tests/Models/NullExchangeLogTest.php index ec689bb..f4227a9 100755 --- a/tests/Models/NullExchangeLogTest.php +++ b/tests/Models/NullExchangeLogTest.php @@ -23,7 +23,7 @@ final class NullExchangeLogTest extends \PHPUnit\Framework\TestCase { /** * @covers Modules\Exchange\Models\NullExchangeLog - * @group framework + * @group module */ public function testNull() : void { @@ -32,11 +32,21 @@ final class NullExchangeLogTest extends \PHPUnit\Framework\TestCase /** * @covers Modules\Exchange\Models\NullExchangeLog - * @group framework + * @group module */ public function testId() : void { $null = new NullExchangeLog(2); self::assertEquals(2, $null->id); } + + /** + * @covers Modules\Exchange\Models\NullExchangeLog + * @group module + */ + public function testJsonSerialize() : void + { + $null = new NullExchangeLog(2); + self::assertEquals(['id' => 2], $null); + } } diff --git a/tests/Models/NullExchangeSettingTest.php b/tests/Models/NullExchangeSettingTest.php index aceb7de..ea491d8 100644 --- a/tests/Models/NullExchangeSettingTest.php +++ b/tests/Models/NullExchangeSettingTest.php @@ -23,7 +23,7 @@ final class NullExchangeSettingTest extends \PHPUnit\Framework\TestCase { /** * @covers Modules\Exchange\Models\NullExchangeSetting - * @group framework + * @group module */ public function testNull() : void { @@ -32,7 +32,7 @@ final class NullExchangeSettingTest extends \PHPUnit\Framework\TestCase /** * @covers Modules\Exchange\Models\NullExchangeSetting - * @group framework + * @group module */ public function testId() : void { @@ -42,7 +42,7 @@ final class NullExchangeSettingTest extends \PHPUnit\Framework\TestCase /** * @covers Modules\Exchange\Models\NullExchangeSetting - * @group framework + * @group module */ public function testJsonSerialize() : void { diff --git a/tests/Models/NullInterfaceManagerTest.php b/tests/Models/NullInterfaceManagerTest.php index 8f1f3af..e9fb88f 100755 --- a/tests/Models/NullInterfaceManagerTest.php +++ b/tests/Models/NullInterfaceManagerTest.php @@ -23,7 +23,7 @@ final class NullInterfaceManagerTest extends \PHPUnit\Framework\TestCase { /** * @covers Modules\Exchange\Models\NullInterfaceManager - * @group framework + * @group module */ public function testNull() : void { @@ -32,11 +32,21 @@ final class NullInterfaceManagerTest extends \PHPUnit\Framework\TestCase /** * @covers Modules\Exchange\Models\NullInterfaceManager - * @group framework + * @group module */ public function testId() : void { $null = new NullInterfaceManager(2); self::assertEquals(2, $null->id); } + + /** + * @covers Modules\Exchange\Models\NullInterfaceManager + * @group module + */ + public function testJsonSerialize() : void + { + $null = new NullInterfaceManager(2); + self::assertEquals(['id' => 2], $null); + } }