From 7c1854aeb0e948fbcb83597f3147b2f1f3d51b56 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Wed, 27 Jan 2016 23:12:07 +0000 Subject: [PATCH] Fix set up/tear down of post types in comment query test. Introduced in [31015]. Props kouratoras. Fixes #35633. git-svn-id: https://develop.svn.wordpress.org/trunk@36415 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/comment/query.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/phpunit/tests/comment/query.php b/tests/phpunit/tests/comment/query.php index 92dbcad458..c717c83cb8 100644 --- a/tests/phpunit/tests/comment/query.php +++ b/tests/phpunit/tests/comment/query.php @@ -1686,6 +1686,7 @@ class Tests_Comment_Query extends WP_UnitTestCase { public function test_post_type_array() { register_post_type( 'post-type-1' ); register_post_type( 'post-type-2' ); + register_post_type( 'post-type-3' ); $p1 = self::factory()->post->create( array( 'post_type' => 'post-type-1' ) ); $p2 = self::factory()->post->create( array( 'post_type' => 'post-type-2' ) ); @@ -1702,9 +1703,6 @@ class Tests_Comment_Query extends WP_UnitTestCase { ) ); $this->assertEqualSets( array_merge( $c1, $c3 ), $found ); - - _unregister_post_type( 'post-type-1' ); - _unregister_post_type( 'post-type-2' ); } public function test_post_name_single_value() {