[wp-trac] [WordPress Trac] #42464: Replace `publish_posts` permission check in `wp_insert_post()`.
WordPress Trac
noreply at wordpress.org
Sat Dec 9 22:44:33 UTC 2017
#42464: Replace `publish_posts` permission check in `wp_insert_post()`.
---------------------------------------------+--------------------------
Reporter: peterwilsoncc | Owner: johnbillion
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 5.0
Component: Role/Capability | Version: 2.7
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests commit | Focuses:
---------------------------------------------+--------------------------
Comment (by johnbillion):
[attachment:42464.3.diff] adds a `tearDownAfterClass()` method to remove
the post type caps added to the admin role. Without this, the
`Tests_User_Capabilities::test_all_caps_of_users_are_being_tested()` and
`Tests_User_Capabilities::testPrimitiveCapsTestsAreCorrect()` rightly
fail. Also tweaked the test names and switched to `assertSame()` as we're
dealing with empty strings.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42464#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list