Opened 9 years ago
Last modified 3 months ago
#37261 new enhancement
Consider removing the `$start` argument from `WP_UnitTest_Generator_Sequence`
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | lowest |
Severity: | normal | Version: | 4.4 |
Component: | Build/Test Tools | Keywords: | needs-patch |
Focuses: | Cc: |
Description
As a follow up to [35244] and [37299], I wonder whether the $start
argument in WP_UnitTest_Generator_Sequence
still makes sense.
Currently the class handles two things:
- Global increments (via the static incrementor variable).
- Local increments (via the
$start
argument).
So I'd propose to remove the $start
argument. A different, simpler class could be used for local increments instead.
Change History (1)
Note: See
TracTickets for help on using
tickets.
Apologies that this one went so long without receiving a reply.
Looking at the test suite as it stands today, the only place where
WP_UnitTest_Generator_Sequence
is used with a$start
value specified is theWP_UnitTest_Factory_For_Network
(source).Marking as the lowest priority. If someone cares enough to take a look and create a patch it can be considered. There should be some research performed to determine what use of the parameter is in the wild, just in case the class is being used in other test suites (maybe by a plugin).