Changes between Version 2 and Version 3 of Ticket #60052, comment 9
- Timestamp:
- 02/20/2025 07:35:53 AM (16 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #60052, comment 9
v2 v3 1 Testing Criteria & Summary of Unit Test 1 **Testing Criteria & Summary of Unit Test** 2 2 3 Testing Criteria: 3 **Testing Criteria:** 4 4 Ensure that an attachment can be deleted even when the post_tag taxonomy has been unregistered. 5 5 Verify that wp_delete_attachment() correctly handles the absence of post_tag without errors. … … 7 7 Confirm that the function returns a valid WP_Post object upon successful deletion. 8 8 9 Unit Test Summary: 9 **Unit Test Summary:** 10 10 This unit test creates a test attachment, unregisters the category and post_tag taxonomies, and then attempts to delete the attachment using wp_delete_attachment(). In previous versions, deleting an attachment after unregistering post_tag could cause a failure (#60052). The test ensures that after the core patch, the function correctly handles missing taxonomies and successfully deletes the attachment. The test also explicitly removes taxonomy entries from $wp_taxonomies to fully replicate the missing taxonomy scenario. 11 11