[wp-trac] [WordPress Trac] #28486: Base unit test does not have setExpectedDeprecated method

WordPress Trac noreply at wordpress.org
Thu Jan 29 14:34:17 UTC 2015


#28486: Base unit test does not have setExpectedDeprecated method
------------------------------+-----------------------------
 Reporter:  rmccue            |       Owner:
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  Future Release
Component:  Build/Test Tools  |     Version:  3.7
 Severity:  normal            |  Resolution:
 Keywords:  needs-patch       |     Focuses:
------------------------------+-----------------------------

Comment (by jdgrimes):

 Welcome @prasoon2211!

 In [attachment:28486.diff], I don't think that it is necessary to have all
 of the `add_action()` calls. The actions will be
 [https://core.trac.wordpress.org/browser/trunk/tests/phpunit/includes/testcase.php#L210
 hooked up] by the `expectDeprecated()` method
 ([https://core.trac.wordpress.org/browser/trunk/tests/phpunit/includes/testcase.php#L54
 called] in `setUp()`). So maybe all you would need is the `array_push()`
 calls.

 Also, it might be nice to add some tests for these methods in
 [https://core.trac.wordpress.org/browser/trunk/tests/phpunit/tests/includes/helpers.php
 /tests/phpunit/tests/includes/helpers.php].

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


More information about the wp-trac mailing list