[wp-trac] [WordPress Trac] #42045: @expectedIncorrectUsage annotation fails under specific scenerio

WordPress Trac noreply at wordpress.org
Sat Sep 30 22:31:53 UTC 2017


#42045: @expectedIncorrectUsage annotation fails under specific scenerio
------------------------------+------------------------------
 Reporter:  thekt12           |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  close             |     Focuses:
------------------------------+------------------------------
Changes (by johnbillion):

 * keywords:   => close


Comment:

 This isn't really any different from PHPUnit's built-in
 `expectedException` functionality. There's no way to assert exactly which
 part of the code threw the exception. The best way to tackle this is to
 write small, tightly focused tests to minimise the chance that the
 unexpected usage is triggered elsewhere.

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


More information about the wp-trac mailing list