From 7c7b902698dba9f25fbaecb5a73fdf445690fb1d Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 21 Oct 2021 22:16:06 +0200 Subject: [PATCH] more tests and make classes final --- Models/NullDashboardBoard.php | 11 ++++++ Models/NullDashboardComponent.php | 11 ++++++ tests/Models/NullDashboardBoardTest.php | 42 +++++++++++++++++++++ tests/Models/NullDashboardComponentTest.php | 42 +++++++++++++++++++++ 4 files changed, 106 insertions(+) create mode 100644 tests/Models/NullDashboardBoardTest.php create mode 100644 tests/Models/NullDashboardComponentTest.php diff --git a/Models/NullDashboardBoard.php b/Models/NullDashboardBoard.php index 76959ba..4845509 100755 --- a/Models/NullDashboardBoard.php +++ b/Models/NullDashboardBoard.php @@ -24,4 +24,15 @@ namespace Modules\Dashboard\Models; */ final class NullDashboardBoard extends DashboardBoard { + /** + * Constructor + * + * @param int $id Model id + * + * @since 1.0.0 + */ + public function __construct(int $id = 0) + { + $this->id = $id; + } } diff --git a/Models/NullDashboardComponent.php b/Models/NullDashboardComponent.php index 49d2bdc..fa26fd0 100755 --- a/Models/NullDashboardComponent.php +++ b/Models/NullDashboardComponent.php @@ -24,4 +24,15 @@ namespace Modules\Dashboard\Models; */ final class NullDashboardComponent extends DashboardComponent { + /** + * Constructor + * + * @param int $id Model id + * + * @since 1.0.0 + */ + public function __construct(int $id = 0) + { + $this->id = $id; + } } diff --git a/tests/Models/NullDashboardBoardTest.php b/tests/Models/NullDashboardBoardTest.php new file mode 100644 index 0000000..7c1bc77 --- /dev/null +++ b/tests/Models/NullDashboardBoardTest.php @@ -0,0 +1,42 @@ +getId()); + } +} diff --git a/tests/Models/NullDashboardComponentTest.php b/tests/Models/NullDashboardComponentTest.php new file mode 100644 index 0000000..8a8a557 --- /dev/null +++ b/tests/Models/NullDashboardComponentTest.php @@ -0,0 +1,42 @@ +getId()); + } +}