[wp-trac] [WordPress Trac] #35199: WP_UnitTest_Generator_Sequence is generating incorrect sequences
WordPress Trac
noreply at wordpress.org
Tue Dec 22 14:58:59 UTC 2015
#35199: WP_UnitTest_Generator_Sequence is generating incorrect sequences
------------------------------+------------------------------
Reporter: OddOneOut | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version: 4.4
Severity: normal | Resolution:
Keywords: | Focuses:
------------------------------+------------------------------
Description changed by johnbillion:
Old description:
> As done in #35244, the change to use a static incrementer seems to cause
> the sequence class to generate incorrect sequences. For example when I
> create two posts, this is the result:
>
> '''Post 1'''
>
> Post title 0
> Post content 1
> Post excerpt 2
>
> '''Post 2'''
>
> Post title 1
> Post content 2
> Post excerpt 3
>
> Shouldn't it be like this:
>
> '''Post 1'''
>
> Post title 1
> Post content 1
> Post excerpt 1
>
> '''Post 2'''
>
> Post title 2
> Post content 2
> Post excerpt 2
>
> Also, is there a way to reset the count? Previously the factory can be
> reset in `setUp` but now it's impossible to do so.
New description:
As done in [35244], the change to use a static incrementer seems to cause
the sequence class to generate incorrect sequences. For example when I
create two posts, this is the result:
'''Post 1'''
Post title 0
Post content 1
Post excerpt 2
'''Post 2'''
Post title 1
Post content 2
Post excerpt 3
Shouldn't it be like this:
'''Post 1'''
Post title 1
Post content 1
Post excerpt 1
'''Post 2'''
Post title 2
Post content 2
Post excerpt 2
Also, is there a way to reset the count? Previously the factory can be
reset in `setUp` but now it's impossible to do so.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35199#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list