[wp-trac] [WordPress Trac] #55652: Test tool and unit test improvements for 6.1

WordPress Trac noreply at wordpress.org
Mon Sep 5 14:31:19 UTC 2022


#55652: Test tool and unit test improvements for 6.1
--------------------------------------+---------------------
 Reporter:  hellofromTonya            |       Owner:  (none)
     Type:  task (blessed)            |      Status:  new
 Priority:  normal                    |   Milestone:  6.1
Component:  Build/Test Tools          |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------

Comment (by SergeyBiryukov):

 In [changeset:"54068" 54068]:
 {{{
 #!CommitTicketReference repository="" revision="54068"
 Tests: Consistently set the current user in the tests for retaining a
 sticky status.

 This affects:
 * `test_user_without_publish_posts_cannot_affect_sticky()`
 * `test_user_without_publish_posts_cannot_affect_sticky_with_edit_post()`

 In both tests, the user is now set after creating the post, not before.
 This aims to better match the intention of the tests, as they ensure that
 a sticky status is unaffected for a post that is ''edited'' by a user
 without the `publish_posts` capability, not necessarily ''created'' by
 that user.

 Includes minor documentation updates for consistency.

 Follow-up to [33096], [35183].

 See #55652.
 }}}

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


More information about the wp-trac mailing list