Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README.md sample test case is incompatible with mock class #151

Closed
phatsk opened this issue Feb 20, 2020 · 1 comment · Fixed by #152
Closed

README.md sample test case is incompatible with mock class #151

phatsk opened this issue Feb 20, 2020 · 1 comment · Fixed by #152
Assignees
Labels
Documentation Updates to documentation
Milestone

Comments

@phatsk
Copy link
Contributor

phatsk commented Feb 20, 2020

Describe the bug
When using the basic template for a test case, PHP complains that the signatures for setUp and tearDown aren't compatible.

To Reproduce
Steps to reproduce the behavior:

  1. Install WP Mock as a dependency
  2. Create a test case using the first basic example in the README.m
  3. Run phpunit
  4. The error reported starts with:
PHP Fatal error:  Declaration of CentralMarket\Tests\Plugins\Membership\MembershipMockTest::tearDown() must be compatible with WP_Mock\Tools\TestCase::tearDown(): void in /Users/phats
k/src/Mindsize/cmlocal/app/public/tests/plugins/cm-membership/MembershipMockTest.php on line 5

Expected behavior
The basic test case should be runnable.

phatsk added a commit to phatsk/wp_mock that referenced this issue Feb 20, 2020
- Fix sample test case method signatures.
@phatsk phatsk mentioned this issue Feb 20, 2020
@phatsk
Copy link
Contributor Author

phatsk commented Feb 20, 2020

PR opened here: #152

@jeffpaul jeffpaul linked a pull request Jul 14, 2020 that will close this issue
@jeffpaul jeffpaul added the Documentation Updates to documentation label Jul 14, 2020
@jeffpaul jeffpaul added this to the 0.4.3 milestone Jul 14, 2020
unfulvio-godaddy added a commit that referenced this issue Sep 16, 2022
Co-authored-by: Fulvio Notarstefano <[email protected]>
agibson-godaddy added a commit that referenced this issue Sep 16, 2022
Accidentally had #151 merged into master, should have targeted `trunk`. 

Just harmless readme change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Updates to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants