10up / wp_mock

WordPress API Mocking Framework
https://wp-mock.gitbook.io
Other
676 stars 70 forks source link

Update `WP_Mock::expectHookNotAdded()` with new params #234

Closed unfulvio-godaddy closed 1 year ago

unfulvio-godaddy commented 1 year ago

Summary

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.

Closes: #233

Contributor checklist

Reviewer checklist

- [x] Code changes review - [ ] Documentation changes review - [x] Unit tests pass - [x] Static analysis passes
coveralls commented 1 year ago

Coverage Status

coverage: 66.312% (+0.7%) from 65.646% when pulling 3d7227896ceda9dd1e95a87e6b690221e1a9c469 on 233-fix/add-expect-hook-not-added-parameters into de812e445e17832703571081aa40f39140497117 on trunk.