[wp-trac] [WordPress Trac] #27749: `wp_die()` should die in plain text when running the test suite

WordPress Trac noreply at wordpress.org
Tue May 6 18:39:59 UTC 2014


#27749: `wp_die()` should die in plain text when running the test suite
-------------------------------+------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Build/Test Tools   |     Version:  3.9
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------

Comment (by jorbin):

 For your own tests, you can create a new wp die handler that doesn't
 return html by filtering wp_die_handler.  You can see an example in
 https://github.com/post-forking/post-
 forking/blob/master/tests/wp_die_handler.php

 In https://core.trac.wordpress.org/changeset/880/tests/trunk we removed
 wp-tests.php and that contained a filter for the wp_die_handler (this code
 still lives in
 https://core.trac.wordpress.org/browser/tests/trunk/includes/utils.php#L305
 but it seems to be unused now)

 I think we should re-add the filter for all tests and create a new handler
 that returns information in plain text.

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


More information about the wp-trac mailing list