[wp-trac] [WordPress Trac] #35199: WP_UnitTest_Generator_Sequence is generating incorrect sequences

WordPress Trac noreply at wordpress.org
Thu Dec 24 16:39:23 UTC 2015


#35199: WP_UnitTest_Generator_Sequence is generating incorrect sequences
------------------------------+------------------
 Reporter:  OddOneOut         |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  4.5
Component:  Build/Test Tools  |     Version:  4.4
 Severity:  normal            |  Resolution:
 Keywords:                    |     Focuses:
------------------------------+------------------

Comment (by OddOneOut):

 Replying to [comment:4 boonebgorges]:
 > All this being said, I think it's worth considering the following:
 >
 > 1. a method that test methods can use to reset the incrementor.
 > 2. more consistent use of incrementors within methods (so that a post
 with "Post title 2" will also use the incrementor 2 in all of its other
 properties)

 Or maybe a way to disable the static incrementor.

 >
 > I do *not* think core tests need to reset the incrementor between tests;
 doing so will make our tests more fragile by causing insert failures when
 a prior test fails to clean up after itself.

 I did not say so, what I mean is that right now there's no way to setup
 test-specific fixtures with the factory, and I believe there are use cases
 for it.

 Thanks for consideration, hopefully there are patches for 4.5, right now I
 will just revert to 4.3 then.

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


More information about the wp-trac mailing list