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

WordPress Trac noreply at wordpress.org
Sat Sep 30 18:41:48 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:                    |     Focuses:
------------------------------+------------------------------
Changes (by swissspidy):

 * version:  trunk =>
 * component:  General => Build/Test Tools


Comment:

 My advice is usually to only write one assertion per test. When you have
 multiple assertions per test method it's just harder to debug and not very
 readable. If you'd do that in #42040, you don't run into this problem.

 I don't think we should encourage having multiple assertions per test by
 "fixing" the `@expectedIncorrectUsage` annotation.

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


More information about the wp-trac mailing list