[wp-trac] [WordPress Trac] #56793: Test tool and unit test improvements for 6.2

WordPress Trac noreply at wordpress.org
Sun Jan 15 13:36:24 UTC 2023


#56793: Test tool and unit test improvements for 6.2
--------------------------------------+---------------------
 Reporter:  desrosj                   |       Owner:  (none)
     Type:  task (blessed)            |      Status:  new
 Priority:  normal                    |   Milestone:  6.2
Component:  Build/Test Tools          |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------

Comment (by SergeyBiryukov):

 In [changeset:"55070" 55070]:
 {{{
 #!CommitTicketReference repository="" revision="55070"
 Tests: Use more specific assertions in image saving tests.

 When passed a `WP_Image_Editor` instance as the `$image` parameter,
 `wp_save_image_file()` returns an array on success, so we can specifically
 check for an array instead of any non-empty result.

 Likewise, in PDF tests, when creating an attachment is expected to return
 an integer ID and not a `WP_Error` object, we can specifically check for
 that.

 Follow-up to [1061/tests], [38949], [39617], [42792], [53529], [53530],
 [53531], [55019], [55066].

 See #56793.
 }}}

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


More information about the wp-trac mailing list