From 57f4d6c7b27db2705721d345fd6bc0927528c663 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 20 Jul 2022 14:47:39 +0000 Subject: [PATCH] Tests: Correct the test for passing all expected parameters to the `preprocess_comment` filter. Previously, `assertSame()` was replaced with `assertSameSets()`, which does not preserve the array keys. `assertSameSetsWithIndex()` should have been used instead. Follow-up to [36038], [48937], [53729], [53730]. See #55647, #56244. git-svn-id: https://develop.svn.wordpress.org/trunk@53732 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/comment-submission.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/comment-submission.php b/tests/phpunit/tests/comment-submission.php index eb52fb0efb..6864c776b0 100644 --- a/tests/phpunit/tests/comment-submission.php +++ b/tests/phpunit/tests/comment-submission.php @@ -811,7 +811,7 @@ class Tests_Comment_Submission extends WP_UnitTestCase { remove_filter( 'preprocess_comment', array( $this, 'filter_preprocess_comment' ) ); $this->assertNotWPError( $comment ); - $this->assertSameSets( + $this->assertSameSetsWithIndex( array( 'comment_post_ID' => self::$post->ID, 'comment_author' => $user->display_name,