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

WordPress Trac noreply at wordpress.org
Sat Jul 2 18:05:46 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:"53634" 53634]:
 #!CommitTicketReference repository="" revision="53634"
 Build/Test Tools: Add support for `WP_Error` in the test suite's
 `wp_die()` handlers.

 This brings parity with WordPress core `wp_die()` handlers and ensures
 that if a `WP_Error` object is passed as the `$message` argument to
 `wp_die()`, the PHPUnit test suite displays the error message correctly.

 Previously, this would cause a silent fatal error: `Object of class
 WP_Error could not be converted to string`, leading to just displaying
 `wp_die called` without any further details.

 Follow-up to [28797], [41966], [44666], [45160], [47882].

 See #55652.

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

More information about the wp-trac mailing list