Make sure you go through the WordPress.org’s official PHPUnit Test docs as well:
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/
Few other PHP Unit Testing for WordPress frameworks:
https://github.com/10up/wp_mock
https://packagist.org/packages/brain/monkey