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

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

Build:
Build:
LAST BUILD BRANCH: trunk
DEFAULT BRANCH: master
Ran 16 Aug 2023 11:56AM 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.312% (+0.7%) from 65.646%
5878415280

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

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

498 of 751 relevant lines covered (66.31%)

2.62 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
79.0
5.0% php/WP_Mock.php
2
38.0
0.0% php/WP_Mock/API/function-mocks.php

Uncovered Existing Lines

Lines Coverage ∆ File
1
79.0
5.0% php/WP_Mock.php
Jobs
ID Job ID Ran Files Coverage
1 5878415280.1 16 Aug 2023 11:56AM CUT 22
66.31
GitHub Action Run
Source Files on build 5878415280
  • Tree
  • List 22
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Loading...
Coverage∆FileLinesRelevantCoveredMissedHits/Line
  • ►
    66.31
    php/
  • Back to Repo
  • e9e421c3 on github
  • Prev Build on trunk (#5664170172)
  • Next Build on trunk (#7335277347)
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