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

WordPress Trac noreply at wordpress.org
Sat Sep 30 18:18:06 UTC 2017


#42045: @expectedIncorrectUsage annotation fails under specific scenerio
--------------------------+-----------------------------
 Reporter:  thekt12       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Suppose if there is test case(the function with @expectedIncorrectUsage
 annotation above it) with two functions where one of the function doesn't
 make any call to `_doing_it_wrong` whereas other function makes more than
 one call to `_doing_it_wrong`.

 as The expected result is

 {{{
 FAILURES!
 Tests: 1, Assertions: 2, Failures: 1.
 }}}

 But it returns

 {{{
 OK (1 test, 2 assertions)
 }}}


 The @expectedIncorrectUsage should check if each function has made a call
 to the `_doing_it_wrong` instead of checking the number of time
 `_doing_it_wrong` was called in a test case and mapping it to the number
 of assertion


 `Earlier Reported Case`:
 [https://core.trac.wordpress.org/ticket/42040#comment:7]

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


More information about the wp-trac mailing list