[wp-trac] [WordPress Trac] #36166: wp_die() doesn't accept a WP_Error during unit testing

WordPress Trac noreply at wordpress.org
Tue Mar 22 19:22:20 UTC 2016


#36166: wp_die() doesn't accept a WP_Error during unit testing
------------------------------+------------------------------
 Reporter:  dd32              |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |     Focuses:
------------------------------+------------------------------

Comment (by xoogu):

 Replying to [comment:3 boonebgorges]:
 > Could I get some more details on how to reproduce? It seems as if the
 issue being reported by @xoogu in the support forums is somewhat different
 from what's being proposed by @utkarshpatel.

 The issue I was having was when installing a plugin as part of the initial
 setup for testing. (The plugin install was called from setUpBeforeClass of
 my test). If the plugin couldn't be installed, then wp_die was called with
 a WP_Error object passed to it.

 (I realise requiring another plugin to be installed rather than just
 mocking it isn't actually unit testing, but that's just how I like to do
 my tests).

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


More information about the wp-trac mailing list