[wp-trac] [WordPress Trac] #27411: Allow adding custom @ticket types for unit tests

WordPress Trac noreply at wordpress.org
Mon Mar 17 08:23:12 UTC 2014


#27411: Allow adding custom @ticket types for unit tests
------------------------------+------------------------------
 Reporter:  rmccue            |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:                    |     Focuses:
------------------------------+------------------------------

Comment (by nacin):

 The checkRequirements method, I imagine, would need to run a generic
 knownBug method (or the like) for an @ticket it doesn't recognize. How
 would it know whether the test should be skipped, otherwise?

 Seems to me like extending checkRequirements, calling
 parent:checkedRequirements(), calling `$tickets =
 PHPUnit_Util_Test::getTickets( get_class( $this ), $this->getName( false )
 );` on your own, and such, is a better method. We could abstract out that
 into a method, at least; that would help.

 I've been thinking for some time now about getting rid of the skipped test
 properties of @ticket. We now only commit tests with the code for them,
 which tells me we could over time remove all existing "skipped" tests.
 Indeed, we haven't exactly added any skipped tests in some time. They'd
 still function as documentation as well as a shortcut for running them.

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


More information about the wp-trac mailing list