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
This commit is contained in:
Sergey Biryukov
2022-07-20 14:47:39 +00:00
parent 2dba3831f5
commit 57f4d6c7b2

View File

@@ -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,