"All new business logic should have corresponding unit tests."
Description
This PR introduces unit tests for the ListContacts and ContactStats classes. The tests cover the new business logic introduced in these classes, ensuring that the application's functionality works as expected.
Summary of Changes
Created ListContactsTest.php in the tests/Unit directory. This test class contains tests for the 'created_at' filter, bulk delete action, and global search functionality in the ListContacts class.
Created ContactStatsTest.php in the tests/Unit directory. This test class contains tests for the total contacts calculation, recent contacts calculation, and contact categorization in the ContactStats class.
These tests help maintain the quality of our codebase by ensuring that new features and changes do not break existing functionality.
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
ListContacts
andContactStats
classes. The tests cover the new business logic introduced in these classes, ensuring that the application's functionality works as expected.Summary of Changes
ListContactsTest.php
in thetests/Unit
directory. This test class contains tests for the 'created_at' filter, bulk delete action, and global search functionality in theListContacts
class.ContactStatsTest.php
in thetests/Unit
directory. This test class contains tests for the total contacts calculation, recent contacts calculation, and contact categorization in theContactStats
class.These tests help maintain the quality of our codebase by ensuring that new features and changes do not break existing functionality.