Just when you need a real time testing like npm run watch this is the stuff

https://github.com/spatie/phpunit-watcher

Install:
composer require spatie/phpunit-watcher --dev

Usage :
vendor/bin/phpunit-watcher watch