Using wp_mocks together with WordPress core Unit tests
@ericmann is already working on this.
Since May 27, 2017.
Assessment
This issue has not been assessed yet.
Description
I know that wp_mock and WordPress core Unit tests work differently and it may not even be possible to have them run together.
I use both and like both. But there are certain tests for which I would prefer wp_mock and certain tests for which I would prefer WordPress core Unit tests. But unfortunately right now there is no way to configure both of them for a single plugin. You have to pick one and stick with it even if you can group all the 'mock' tests using a separate testsuite or phpunit group and invoke the separately from phpunit.
What I am suggesting is to have a way to setup both of them together for a plugin and invoke the appropriate framework and their tests using either phpunit's group or testsuite feature.
I know that there was some recent discussion about it and I am interested in knowing everyone's thoughts on it.
- Dominant language
- PHP
- Stars
- 714
- Forks
- 72
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from 10up/wp_mock
-
`expectActionAdded( array( Functions::type( class-string ), 'method' ) )` fails when same method name used twicePossibly taken @faisalahammad claimed this 126 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 50/100
-
PHPCS reporting error on dependent library nikic/php-parser, hamcrest/hamcrest-phpPossibly taken @faisalahammad claimed this 126 days ago. OpenDependencies
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Request: control Strict Mode per testPossibly taken @BrianHenryIE claimed this 311 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Pass in Closure for HooksPossibly taken @faisalahammad claimed this 126 days ago. OpenEnhancement Question
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Dependencies PHPUnit
Difficulty 5/5 Over a week Newbie friendliness 30/100
Similar issues
-
wpvc
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
10up/autoshare-for-twitter#438 ·
-
wpvc
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
10up/Ad-Refresh-Control#240 ·
-
wpvc
Difficulty 1/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Backend bug severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
RunningJoke/allipunkte#74 ·