Add a (development-time) dependency on phpunit/phpunit to your project’s composer.json file if you use Composer to manage the dependencies of your project:
composer require –dev phpunit/phpunit ^9.5
You can run PHPUnit tests by running in command from plugin root directory.
./vender/bin/phpunit
Reference: https://phpunit.readthedocs.io/en/9.5/installation.html
References