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

Add invokeInaccessibleMethod and getInaccessiblePropertyValue trait methods #220

Merged

Conversation

unfulvio-godaddy
Copy link
Member

@unfulvio-godaddy unfulvio-godaddy commented Jun 29, 2023

Summary

Improves the AccessInaccessibleClassMembersTrait used in WP_Mock own TestCase to invoke an inaccessible class method or get an inaccessible property value.

Contributor checklist

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly
  • I have added tests to cover changes introduced by this pull request
  • All new and existing tests pass

Testing

Reviewer checklist

  • Code changes review
  • Documentation changes review
  • Unit tests pass
  • Static analysis passes

@unfulvio-godaddy unfulvio-godaddy self-assigned this Jun 29, 2023
@unfulvio-godaddy unfulvio-godaddy added this to the v1.0.0 milestone Jun 29, 2023
@unfulvio-godaddy unfulvio-godaddy requested a review from a team June 29, 2023 10:10
@coveralls
Copy link

Coverage Status

coverage: 59.707% (-0.03%) from 59.733% when pulling 284cad5 on chore/add-access-inaccessible-class-member-functions into 1937bad on trunk.

Copy link
Contributor

@agibson-godaddy agibson-godaddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM -- just a nit picky comment suggestion.

php/WP_Mock/Traits/AccessInaccessibleClassMembersTrait.php Outdated Show resolved Hide resolved
Co-authored-by: Ashley Gibson <99189195+agibson-godaddy@users.noreply.github.com>
@unfulvio-godaddy unfulvio-godaddy requested review from agibson-godaddy and a team July 3, 2023 10:41
@unfulvio-godaddy
Copy link
Member Author

thanks for the phpdoc edit @agibson-godaddy -- makes sense to me; mind reapproving? thank you

@agibson-godaddy agibson-godaddy merged commit 4b56a8c into trunk Jul 3, 2023
7 checks passed
@agibson-godaddy agibson-godaddy deleted the chore/add-access-inaccessible-class-member-functions branch July 3, 2023 10:58
@unfulvio-godaddy unfulvio-godaddy added the Enhancement New feature proposal or pull request label Jul 6, 2023
nmolham-godaddy added a commit that referenced this pull request Jul 6, 2023
# Summary <!-- Required -->

While adding #220 I forgot one
method (for @10up/godaddy-wp_mock these are basically the same as in MWC
Tests, and with the addition of this PR we can drop them -- figured
these are generally helpful and could be part of WP_Mock directly).

This PR also updates the docs related to
`AccessInaccessibleClassMembersTrait`.

Fixes an unrelated flaky test.

## 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

## Testing <!-- Required -->

<!-- If applicable, add specific steps for the reviewer to perform as
part of their testing process prior to approving this pull request. -->

<!-- List any configuration requirements for testing. -->

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

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

- [ ] Code changes review
- [ ] Documentation changes review
- [ ] Unit tests pass
- [ ] Static analysis passes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature proposal or pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants