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

WordPress Trac noreply at wordpress.org
Sun Oct 9 16:34:00 UTC 2022


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

Comment (by SergeyBiryukov):

 In [changeset:"54425" 54425]:
 {{{
 #!CommitTicketReference repository="" revision="54425"
 Tests: Clean up test images in `WP_Customize_Manager` tests.

 The test for `WP_Customizer_Manager::import_theme_starter_content()`
 creates two attachments that remain in the `uploads` directory after the
 test run is complete.

 This commit follows the approach from `WP_REST_Posts_Controller` tests and
 utilizes an `$attachments_created` property to track any files uploaded in
 the current test run and clean them up afterwards.

 This makes sure there are no leftover images after the test class is run.

 Follow-up to [39276], [39346], [39411], [40142], [53935], [54424].

 See #55652.
 }}}

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


More information about the wp-trac mailing list