#34075 closed task (blessed) (fixed)
Consolidate methods for creating image attachments in tests
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.4 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Build/Test Tools | Keywords: | needs-patch |
| Focuses: | Cc: |
Description
In our test suite, we have three instances of a _make_attachment() helper function for uploading a file and creating an attachment for tests. They are in tests/image/intermediate_size.php, tests/post/attachment.php, and tests/ajax/MediaElement.php.
We should replace these helper functions with a new factory method inside WP_UnitTest_Factory_For_Attachment.
Change History (6)
Note: See
TracTickets for help on using
tickets.
Or we could just have a globally-available tool - either a method on
WP_UnitTestCase, or a utils function.