You can try wrapping the function, put all of the filters / actions there For example
function my_init()
{
add_filter("asdasd", static function() {
echo 'asdf';
});
}
my_init();
Then on phpunit you can declare to collect coverage from my_init