-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Fix Windows paths resulting from get_attached_file.
#2442
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
Conversation
costdev
left a comment
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.
Just one suggestion to use a data provider for the new test method.
| /** | ||
| * @ticket 36308 | ||
| */ | ||
| public function test_get_attached_file_with_windows_paths() { |
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.
Using a data provider for the file, expected values, and possibly the message value, will ensure that both assertions run even if one happens to fail, and makes it easier to add more tests for this in future if needed.
johnbillion
left a comment
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.
This looks good and there's a good amount of test coverage, but I'd also like to see the tests in Tests_Post_GetAttachedFile use a data provider 👍
Hi @johnbillion, see PR 3049 which is a refresh of this PR that uses a data provider in |
|
Closing in favour of #3049 👍 |
Trac ticket: https://core.trac.wordpress.org/ticket/36308.