[wp-trac] [WordPress Trac] #31362: expectedDeprecated() does unexpected things when there's an unexpected deprecated notice

WordPress Trac noreply at wordpress.org
Tue Feb 17 15:05:17 UTC 2015


#31362: expectedDeprecated() does unexpected things when there's an unexpected
deprecated notice
------------------------------+-----------------------------
 Reporter:  jdgrimes          |      Owner:
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Build/Test Tools  |    Version:  3.7
 Severity:  normal            |   Keywords:
  Focuses:                    |
------------------------------+-----------------------------
 While testing some deprecated code yesterday I found some bugs with the
 `@expectedDeprecated` features of `WP_UnitTestCase`.

 - If there are multiple unexpected deprecated warnings in a test, only the
 first is reported. Because you can only `fail()` once, you know. Also, if
 there is both a deprecated and a doing-it-wrong error, only the deprecated
 error will be reported. This is annoying, because when you add the
 `@expectedDeprecated` annotation you expect it to be fixed, and its not.
 There's another warning you weren't told about before.
 - When there is an unexpected deprecated/doing-it-wrong error, the will
 tests `fail()` at the start `tearDown()`, meaning that the cleanup is
 incomplete. This can cause lots of weirdness in later tests that are
 perfectly fine otherwise. All of that goes away once the appropriate
 `@expectedDeprecated` annotation is added, but it can really befuddle you.

 Patch forthcoming.

 Introduced in [25408].

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


More information about the wp-trac mailing list