Adds method params to expectHookNotAdded for priority and allowed arguments that are symmetrical to expectHookAdded - and carries them over the aliased functions for filter and action hooks.
This way, we can set more specific expectations than assuming hooks will always have 10, 1 as priority/args allowed.
The PR also improves the WP_Mock hook methods phpdocs and types to match current standards.
coverage: 66.312% (+0.7%) from 65.646% when pulling 3d7227896ceda9dd1e95a87e6b690221e1a9c469 on 233-fix/add-expect-hook-not-added-parameters into de812e445e17832703571081aa40f39140497117 on trunk.
Summary
Adds method params to
expectHookNotAdded
for priority and allowed arguments that are symmetrical toexpectHookAdded
- and carries them over the aliased functions for filter and action hooks.This way, we can set more specific expectations than assuming hooks will always have
10, 1
as priority/args allowed.The PR also improves the WP_Mock hook methods phpdocs and types to match current standards.
Closes: #233
Contributor checklist
Reviewer checklist
- [x] Code changes review - [ ] Documentation changes review - [x] Unit tests pass - [x] Static analysis passes