-
Notifications
You must be signed in to change notification settings - Fork 7
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
WP authors migration command - post type argument. #122
Conversation
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.
The code looks good.
But there should probably be one or more tests for this new functionality. I'd suggest testing:
- the default value works
- posts and pages work
- maybe a cpt too
Hey @mikelittle - digging up an old pull request here! But the need for this functionality came up again. We don't have any precedence in the Authorship plugin for writing tests against CLI command functionaltiy... so I did something very basic by calling the function directly and verifying the data changed as expected. To the cases you suggest...
|
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.
I couldn't get the tests to run in my brief attempt at a local set up, but it all looks good to me.
Ha me neither. I didn’t really try TBH, I just relied on the CI to run them! |
All the tests passed. (though they were marked risky because of the output). |
The recently added wp authors migration command uses query_posts, but does not provide a way to query multiple post types.
New param defaults to just posts, but supports passing another post type, or comma separated list of post types.
e.g.