-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
CRM-21212 Include getUfId function for wordpress to help getting E2E … #11017
Conversation
…unit tests running for wordpress ---------------------------------------- * CRM-21212: Get E2E Tests working on wordpress https://issues.civicrm.org/jira/browse/CRM-21212
also ping @kcristiano are you able to validate if this looks right to you? |
@totten I think this will leave 1 E2E test that doesn't seem to be working for me locally but maybe environmental issues |
* @return int|NULL | ||
*/ | ||
public function getUfId($username) { | ||
$userdata = get_user_by('login', $username); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seamuslee001 is there a reason you want to use get_user_by() as opposed to get_current_user_id() ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kcristiano I saw its what is used in the function just above in L334, The purpose of this i think is that in the E2E tests we are passing through a user name + pw and authenticating then wanting to get the id back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct - I was not thinking about the proper context. As we are running tests we need to pas in the user name = pw.
@totten I think given Kevin's comments i think this is good to merge |
Thank you, @seamuslee001 @kcristiano. :) For anyone reading this later, it may not be very clear what
The feature relies on |
…unit tests running for wordpress
https://issues.civicrm.org/jira/browse/CRM-21212
ping @totten