I have following, very simple, XML config for PHPUnit:
For Phpunit 6.5, exclude is under whitelist
exclude
whitelist
<filter> <whitelist> <directory suffix=".php">src</directory> <exclude> <directory>src/Migrations</directory> <file>src/kernel.php</file> </exclude> </whitelist> </filter>