8000 Add unit tests for Two_Factor_Provider::get_code(). by dd32 · Pull Request #522 · WordPress/two-factor · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add unit tests for Two_Factor_Provider::get_code(). #522

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

Merged
merged 3 commits into from
Feb 17, 2023

Conversation

dd32
Copy link
Member
@dd32 dd32 commented Feb 15, 2023

This was split out of #518 as it's technically unrelated, and is failing for some reason in GitHub actions, but passing locally.

I can't really determine by looking at the code why it's failing though.

@dd32
Copy link
Member Author
dd32 commented Feb 15, 2023

This fails on WordPress 6.0 due to https://core.trac.wordpress.org/ticket/55194

Opened #523 to run unit tests against trunk as well.

edit: I had included a check for WP < 6.1 and skipping the test, but I've thrown that out of this PR as it's not needed if we test with stable WordPress as in #524

@dd32 dd32 marked this pull request as ready for review February 15, 2023 03:08
@dd32 dd32 mentioned this pull request Feb 15, 2023
@dd32 dd32 force-pushed the add/tests-for-get_code branch from a10cc25 to d382826 Compare February 15, 2023 04:08
@dd32
Copy link
Member Author
dd32 commented Feb 15, 2023

In making this testable, since Two_Factor_Provider is an abstract class, I chose to simply make it a static method due to it's lack of $this-> usage. $this->get_code() is still acceptable, but now Two_Factor_Provider::get_code() also is.

@jeffpaul jeffpaul added this to the 0.8.0 milestone Feb 15, 2023
Copy link
Member
@iandunn iandunn left a comment

Choose a reason for hiding this comment

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

Looks like this is working after #524 👍🏻

dd32 and others added 2 commits February 17, 2023 12:11
…ct character output

Co-authored-by: Ian Dunn <ian@iandunn.name>
@dd32 dd32 merged commit 4bfb2ec into WordPress:master Feb 17, 2023
@dd32 dd32 deleted the add/tests-for-get_code branch February 17, 2023 02:52
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.

3 participants
0