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

Users connector class test implemented. #1151

Merged
merged 6 commits into from
Jan 12, 2021
Merged

Conversation

kidunot89
Copy link
Contributor

@kidunot89 kidunot89 commented Jul 30, 2020

Partially fixes #1093
Potentially fixes #946

Summary checklist

  • clear_auth_cookie callback test implemented and passing.
  • delete_user callback test implemented and passing.
  • deleted_user callback test implemented and passing.
  • password_reset callback test implemented and passing.
  • profile_update callback test implemented and passing.
  • retrieve_password callback test implemented and passing.
  • set_current_user callback test implemented and passing.
  • set_logged_in_cookie callback test implemented and passing.
  • set_user_role callback test implemented and passing.
  • user_register callback test implemented and passing.

@kidunot89 kidunot89 self-assigned this Jul 30, 2020
@kidunot89 kidunot89 changed the title Users connector class test implemented. WIP Users connector class test implemented. Jul 30, 2020
@kidunot89 kidunot89 added the needs discussion The issue/PR needs further discussion before a solution can be implemented label Jul 30, 2020
@kidunot89 kidunot89 added the work in progress Issue or pull request is still under development (DO NOT MERGE) label Aug 5, 2020
@kidunot89 kidunot89 changed the title WIP Users connector class test implemented. Users connector class test implemented. Aug 24, 2020
@kidunot89 kidunot89 removed needs discussion The issue/PR needs further discussion before a solution can be implemented work in progress Issue or pull request is still under development (DO NOT MERGE) labels Aug 26, 2020
Copy link
Member

@dero dero left a comment

Choose a reason for hiding this comment

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

@kidunot89 This looks really good, just a couple comments here. Thanks!

@@ -91,10 +91,6 @@ public function register() {
* Unregister all context hooks
*/
public function unregister() {
if ( ! $this->is_registered ) {
Copy link
Member

Choose a reason for hiding this comment

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

@kidunot89 Can you give me more context for this change? Why is it being removed?

Copy link
Contributor Author

@kidunot89 kidunot89 Sep 16, 2020

Choose a reason for hiding this comment

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

@dero Because I noticed that somewhere between tests the connectors where ending in a state where the callback hooks were registered and the is_registered flag was false but the action were still registered and somehow prevent the mocked connector class actions from getting the data on logs catching deletions. This has actually been happening across multiple connector test and is also the cause for hold up on the last test of the comment connector test case

connectors/class-connector-users.php Outdated Show resolved Hide resolved
tests/tests/connectors/test-class-connector-users.php Outdated Show resolved Hide resolved
@kidunot89 kidunot89 merged commit abfee72 into develop Jan 12, 2021
@kidunot89 kidunot89 deleted the tests/users-connector branch January 12, 2021 21:42
@kidunot89 kidunot89 mentioned this pull request Jan 12, 2021
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Test Coverage Stream not capturing SSO sign-ins from OneLogin
2 participants