I found this example but it doesn't look like it would generalise to all hooks.
The use case is for API4 - basically whenever any action is called I think we should be able to verify that particular hooks (and only those hooks) are called.
So I figured this out. The specific hook engine for unit testing, very conveniently, comes with an injectable mock property.
After grabbing the hook engine with
$this->hookClass = \CRM_Utils_Hook::singleton() you just need to inject a mock object that has a magic
__call() method with somthing like:
The hook engine will then call your
__call($name, $arguments) method with every hook invocation.
You can see a fuller example here (please ignore the reporting stuff going on - I doubt that is best practice! Also the use of the unit test class as the mock is a bit lazy - its probably best to make a new class to provide the mock)