Changes between Version 4 and Version 5 of Ticket #55918
- Timestamp:
- 06/04/2022 03:34:56 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #55918 – Description
v4 v5 32 32 However, at present, that would not work as expected: by the time `wp_delete_attachment()` runs, the attachment ID is no longer in the database, so it returns early, leaving some files in the `uploads` directory. This was previously tangentially noted in comment:6:ticket:38264. 33 33 34 By calling `wpTearDownAfterClass()` in `WP_UnitTestCase_Base::tear_down_after_class()` before deleting all data, instead of after, we can make sure both of these methods have access to the same data and can pe form cleanup as necessary.34 By calling `wpTearDownAfterClass()` in `WP_UnitTestCase_Base::tear_down_after_class()` before deleting all data, instead of after, we can make sure both of these methods have access to the same data and can perform cleanup as necessary. 35 35 36 36 As a potential further enhancement, we could standardize on `wpSetUpBeforeClass()` / `wpTearDownAfterClass()` across the test suite for consistency, as these are already used in the majority of tests.