10up / wp_mock

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

`expectHookNotAdded` should accept priority and arguments parameters with defaults as `expectHookAdded` #233

Closed unfulvio-godaddy closed 1 year ago

unfulvio-godaddy commented 1 year ago

Bug report

Adding a filter or action hook in code with a priority or param numbers different than 10, 1 means currently using expectHookNotAdded may not work since it has hardcoded values of 10, 1: https://github.com/10up/wp_mock/blob/trunk/php/WP_Mock.php#L376

Proposed solution

Add new parameters to expectHookNotAdded similar to expectHookAdded and assign a default of 10, 1 to keep current behavior.