• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

10up / wp_mock / 7335277347
66%
master: 52%

Build:
Build:
LAST BUILD BRANCH: trunk
DEFAULT BRANCH: master
Ran 27 Dec 2023 05:07AM CUT
Jobs 1
Files 22
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Aug 2023 11:55AM CUT coverage: 66.445% (+0.8%) from 65.646%
7335277347

push

github

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

<!--
Filling out the required portions of this template is mandatory. 
Any PR that does not include enough information to be reviewed may be
closed at a maintainers' discretion.
All new code requires associated documentation and unit tests.
-->

# Summary <!-- Required -->

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 <!-- Required -->

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you are unsure about any of these, please ask for
clarification. We are here to help! -->

- [x] I agree to follow this project's [**Code of
Conduct**](https://github.com/10up/.github/blob/trunk/CODE_OF_CONDUCT.md).
- [x] I have updated the documentation accordingly 
- [x] I have added tests to cover changes introduced by this pull
request
- [x] All new and existing tests pass

### Reviewer checklist <!-- Required -->

<!-- The following checklist is for the reviewer: add any steps that may
be relevant while reviewing this pull request -->

- [x] Code changes review
- [ ] Documentation changes review
- [x] Unit tests pass
- [x] Static analysis passes

14 of 17 new or added lines in 2 files covered. (82.35%)

499 of 751 relevant lines covered (66.44%)

2.61 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
80.0
6.0% php/WP_Mock.php
2
38.0
0.0% php/WP_Mock/API/function-mocks.php
Jobs
ID Job ID Ran Files Coverage
1 7335277347.1 27 Dec 2023 05:07AM CUT 22
66.44
GitHub Action Run
Source Files on build 7335277347
  • Tree
  • List 22
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Loading...
Coverage∆FileLinesRelevantCoveredMissedHits/Line
0.0
php/WP_Mock/Filter.php79 19 0 19 0.0
0.0
php/WP_Mock/API/constant-mocks.php72 20 0 20 0.0
0.0
php/WP_Mock/InvokedFilterValue.php26 2 0 2 0.0
0.0
php/WP_Mock/HookedCallback.php115 35 0 35 0.0
0.0
php/WP_Mock/Action.php81 23 0 23 0.0
0.0
php/WP_Mock/EventManager.php169 36 0 36 0.0
38.0
php/WP_Mock/API/function-mocks.php269 + 1050 19 31 1.0
47.06
php/WP_Mock/Hook.php131 34 16 18 4.0
62.5
php/WP_Mock/Tools/Constraints/ExpectationsMet.php69 8 5 3 1.0
77.42
php/WP_Mock/Tools/TestCase.php396 93 72 21 1.0
Showing 1 to 10 of 22 entries
  • Previous
  • 1
  • 2
  • 3
  • Next
  • ►
    66.44
    php/
  • Back to Repo
  • e9e421c3 on github
  • Prev Build on trunk (#5664170172)
  • Next Build on trunk (#7405155962)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc