From 808d901de0bccd91a830f28cd33cb84b2a451797 Mon Sep 17 00:00:00 2001 From: Muhibul Haque Date: Wed, 4 Nov 2026 12:51:48 +0600 Subject: [PATCH] Tests: Clean up custom post types in Tests_Link. See #65893. Props devmuhib009. --- tests/phpunit/tests/link.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/phpunit/tests/link.php b/tests/phpunit/tests/link.php index ceb12d0c3900d..644f9fc1269df 100644 --- a/tests/phpunit/tests/link.php +++ b/tests/phpunit/tests/link.php @@ -4,6 +4,13 @@ */ class Tests_Link extends WP_UnitTestCase { + public function tear_down() { + unregister_post_type( 'wptests_pt' ); + unregister_post_type( 'not_a_post_type' ); + + parent::tear_down(); + } + public function test_wp_get_shortlink() { $post_id = self::factory()->post->create(); $post_id2 = self::factory()->post->create();