Changes between Version 1 and Version 2 of Ticket #60052, comment 9
- Timestamp:
- 02/20/2025 07:35:38 AM (9 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #60052, comment 9
v1 v2 1 1 Testing Criteria & Summary of Unit Test 2 2 3 Testing Criteria: 3 4 Ensure that an attachment can be deleted even when the post_tag taxonomy has been unregistered. … … 5 6 Simulate real-world conditions by unregistering both category and post_tag taxonomies before deleting the attachment. 6 7 Confirm that the function returns a valid WP_Post object upon successful deletion. 8 7 9 Unit Test Summary: 8 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.