Skip to content

Commit aca2a31

Browse files
committed
Tests: Use the public API for REST user post type cleanup.
Replace four `_unregister_post_type()` calls with `unregister_post_type()` in `WP_Test_REST_Users_Controller::wpTearDownAfterClass()`. Preserve the existing class-level cleanup for fixtures that opt out of automatic unregistration. Developed in: #15490 Props devmuhib. See #65893. git-svn-id: https://develop.svn.wordpress.org/trunk@65404 602fd350-edb4-49c9-b593-d223f7449a82
1 parent b1f0c9f commit aca2a31

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎tests/phpunit/tests/rest-api/rest-users-controller.php‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ public static function wpTearDownAfterClass() {
142142
self::delete_user( $author );
143143
}
144144

145-
_unregister_post_type( 'r_true_p_true' );
146-
_unregister_post_type( 'r_true_p_false' );
147-
_unregister_post_type( 'r_false_p_true' );
148-
_unregister_post_type( 'r_false_p_false' );
145+
unregister_post_type( 'r_true_p_true' );
146+
unregister_post_type( 'r_true_p_false' );
147+
unregister_post_type( 'r_false_p_true' );
148+
unregister_post_type( 'r_false_p_false' );
149149

150150
if ( is_multisite() ) {
151151
wp_delete_site( self::$site );

0 commit comments

Comments
 (0)