"All new business logic should have corresponding unit tests."
Description
This PR introduces unit tests for the AdminPanelProvider, BuyerPanelProvider, and SellerPanelProvider classes. These tests ensure that the login, register, resetPasswords, and verifyEmails functionalities are correctly implemented and working as expected.
The tests are designed to run independently, be repeatable, and cover all possible edge cases to ensure the reliability and quality of the codebase.
Summary of Changes
Created AdminPanelProviderTest.php in the tests/Unit/Providers/Filament directory to test the AdminPanelProvider class.
Created BuyerPanelProviderTest.php in the tests/Unit/Providers/Filament directory to test the BuyerPanelProvider class.
Created SellerPanelProviderTest.php in the tests/Unit/Providers/Filament directory to test the SellerPanelProvider class.
Each test file contains methods that instantiate the respective Panel Provider class, invoke the panel method with a mock Panel object, and assert that the configurations (such as login, register, resetPasswords, and verifyEmails functionalities) are correctly applied.
PR Feedback (click)
I created this PR to address this rule:
"All new business logic should have corresponding unit tests."
Description
This PR introduces unit tests for the
AdminPanelProvider
,BuyerPanelProvider
, andSellerPanelProvider
classes. These tests ensure that the login, register, resetPasswords, and verifyEmails functionalities are correctly implemented and working as expected.The tests are designed to run independently, be repeatable, and cover all possible edge cases to ensure the reliability and quality of the codebase.
Summary of Changes
AdminPanelProviderTest.php
in thetests/Unit/Providers/Filament
directory to test theAdminPanelProvider
class.BuyerPanelProviderTest.php
in thetests/Unit/Providers/Filament
directory to test theBuyerPanelProvider
class.SellerPanelProviderTest.php
in thetests/Unit/Providers/Filament
directory to test theSellerPanelProvider
class.Each test file contains methods that instantiate the respective Panel Provider class, invoke the
panel
method with a mockPanel
object, and assert that the configurations (such as login, register, resetPasswords, and verifyEmails functionalities) are correctly applied.