[wp-trac] [WordPress Trac] #37989: Unexpected change to media title behavior in WP 4.6.1

WordPress Trac noreply at wordpress.org
Thu Sep 15 02:25:57 UTC 2016


#37989: Unexpected change to media title behavior in WP 4.6.1
--------------------------------------+------------------------
 Reporter:  arhenderson63             |       Owner:  joemcgill
     Type:  defect (bug)              |      Status:  accepted
 Priority:  normal                    |   Milestone:  4.6.2
Component:  Media                     |     Version:  4.6.1
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------
Changes (by joemcgill):

 * keywords:  has-patch needs-unit-tests => has-patch has-unit-tests


Comment:

 [attachment:37989.3.diff] simplifies slightly from
 [attachment:37989.2.diff] and adds a unit test to at least cover the most
 basic expected behavior.

 It would be nice to be able to create unit tests for multiple edge cases,
 but I would first want to refactor `media_handle_upload()` so the logic
 that creates the attachment parameters was isolated from the process of
 uploading an image and inserting the data into the database. Currently,
 the only way to test this behavior is to execute an upload of a file, and
 then test to see if the title of the post created for that attachment that
 is matches our expected file name. If we were to create a large number of
 these tests, the upload process would become a pretty big drag on our test
 suite, which I'd like to avoid.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37989#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list