wordpress-develop/tests/phpunit/tests/admin
Tonya Mork 88570fd5b3 Tests: Fix leakage in WP_List_Table tests.
Fixes `WP_List_table` tests leaking into other tests by:

* Restores the original `$hook_suffix` global value.
Rather than modifying the global for all tests, it now restores the original value between tests. Why? To ensure each test starts at a known state.

* Uses a new instance of `WP_List_Table` for each test.
A test may modify the `$list_table` object. If it does, it could impact tests yet to run. By instantiating a new instance in the `set_up()` test fixture, each test is isolated from the others.

Follow-up to [53868], [54215].

Props hellofromTonya, antonvlasenko.
See #58955, #58896.

git-svn-id: https://develop.svn.wordpress.org/trunk@56348 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-02 17:58:18 +00:00
..
includesComment.php Tests: Add missing @covers tags for Tests_Admin_IncludesComment. 2021-09-01 21:58:32 +00:00
includesFile.php HTTP API: Fix request header inconsistencies. 2023-02-03 13:33:18 +00:00
includesMisc.php Build/Test Tools: Add missing @covers and visibility for Tests_Admin_includesMisc. 2021-11-02 22:07:49 +00:00
includesPlugin.php I18N: Introduce WP_Textdomain_Registry to store text domains and their language directory paths. 2022-08-11 12:37:05 +00:00
includesPost.php Quick/Bulk Edit: Ensure scheduled posts are published when using Bulk Edit. 2023-07-02 08:02:45 +00:00
includesSchema.php Date/Time: Correct sanitization of localized default timezone_string in populate_options(). 2022-09-20 00:41:58 +00:00
includesScreen.php Tests: Use the factory method instead of the property. 2022-09-06 22:09:49 +00:00
includesTemplate.php Tests: Use the data_ prefix for various data provider methods. 2023-03-19 12:03:30 +00:00
includesTheme.php Tests: Use the factory method instead of the property. 2022-09-06 22:09:49 +00:00
includesUser.php Application Passwords: Allow plain HTTP success and reject URLs when using a local environment type. 2023-02-07 17:43:55 +00:00
wpAutomaticUpdater.php Upgrade/Install: Initialize the local $checkout variable in WP_Automatic_Updater::is_vcs_checkout(). 2023-07-02 10:33:18 +00:00
wpCommentsListTable.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2022-11-29 12:32:37 +00:00
wpCommunityEvents.php Tests: Merge file-level and class-level DocBlocks in various unit test files. 2023-02-14 16:10:13 +00:00
wpListTable.php Tests: Fix leakage in WP_List_Table tests. 2023-08-02 17:58:18 +00:00
wpMediaListTable.php General: Increase the minimum supported version of PHP to 7.0.0. 2023-07-05 17:39:55 +00:00
wpPluginInstallListTable.php Administration: Add new get_views_links method to WP_List_Table. 2022-09-19 21:06:08 +00:00
wpPluginsListTable.php Coding Standards: Fix a PHPCS issue found in wpPluginsListTable.php. 2023-06-27 16:09:19 +00:00
wpPostCommentsListTable.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2022-11-29 12:32:37 +00:00
wpPostsListTable.php Tests: Remove expectation of a deprecation notice from WP_Posts_List_Table tests. 2023-05-14 18:43:46 +00:00
wpPrivacyRequestsTable.php Tests: Use the data_ prefix for various data provider methods. 2023-03-19 12:03:30 +00:00
wpSiteHealth.php General: Use static on closures whenever $this is not used to avoid memory leaks. 2023-05-17 22:44:21 +00:00
wpThemeInstallListTable.php Administration: Add new get_views_links method to WP_List_Table. 2022-09-19 21:06:08 +00:00
wpUsersListTable.php Administration: Add new get_views_links method to WP_List_Table. 2022-09-19 21:06:08 +00:00