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

Feature/updated unit tests #56

Merged
merged 54 commits into from
Mar 27, 2019

Conversation

petenelson
Copy link
Contributor

No description provided.

@petenelson
Copy link
Contributor Author

This covers issue #55

Aside from the new unit tests, the main changes to the plugin code are:

  • Refactored the restrict_access function into a new restrict_access_check function. The new function just performs the checks, and the original calls the new function and performs the redirect or die as-needed.
  • Fixed a bug that caused a redirect loop if there weren't any pretty permalinks set.
  • Added codeCoverage directives where they were needed.
  • Other minor refactoring to allow better testing.

@adamsilverstein
Copy link

This is tremendous @petenelson! Is this ready for merge? do you have time to work on resolving the merge conflict? looks like something small.

@petenelson
Copy link
Contributor Author

Thanks @adamsilverstein, merge conflict has been resolved.

@jeffpaul jeffpaul added the type:enhancement New feature or request. label Feb 6, 2019
@jeffpaul jeffpaul added this to the 7.1.0 milestone Feb 6, 2019
@adamsilverstein adamsilverstein self-assigned this Mar 20, 2019
Copy link

@adamsilverstein adamsilverstein left a comment

Choose a reason for hiding this comment

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

Looks Excellent! Going to do some local testing, then merge.

@adamsilverstein
Copy link

Tests went well, we should update the readme with info about the WP_TESTS_DOMAIN constant since it will disable functionality.

@adamsilverstein adamsilverstein merged commit 966130b into 10up:develop Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants