From 4d28f7f67593ec14f5f5de619640ded2d112a2f4 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 29 Oct 2022 15:57:48 +0000 Subject: [PATCH] Tests: Remove unused `$user_ids` property in `Tests_Ajax_Autosave` class. This was previously used to delete the users created during `wpSetUpBeforeClass()`, however that now happens automatically in `WP_UnitTestCase_Base::tear_down_after_class()` via `_delete_all_data()`. Follow-up to [35311], [37404], [38398]. See #56793. git-svn-id: https://develop.svn.wordpress.org/trunk@54720 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/ajax/Autosave.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/phpunit/tests/ajax/Autosave.php b/tests/phpunit/tests/ajax/Autosave.php index a3c57070ef..a4f851762a 100644 --- a/tests/phpunit/tests/ajax/Autosave.php +++ b/tests/phpunit/tests/ajax/Autosave.php @@ -26,13 +26,10 @@ class Tests_Ajax_Autosave extends WP_Ajax_UnitTestCase { protected static $editor_id = 0; protected static $post; protected static $post_id; - protected static $user_ids = array(); public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { self::$admin_id = $factory->user->create( array( 'role' => 'administrator' ) ); - self::$user_ids[] = self::$admin_id; self::$editor_id = $factory->user->create( array( 'role' => 'editor' ) ); - self::$user_ids[] = self::$editor_id; // Set a user so the $post has 'post_author'. wp_set_current_user( self::$admin_id );