Tests: Use more descriptive name for a wp_new_comment() test.

Includes:
* Correcting the order of expected and actual values.
* Adding a missing `@covers` tag for another test next to it.

Follow-up to [32299], [53863], [54489].

See #56793.

git-svn-id: https://develop.svn.wordpress.org/trunk@54949 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2022-12-08 15:07:45 +00:00
parent 905bc9651f
commit 0e9c555840

View File

@ -523,7 +523,7 @@ class Tests_Comment extends WP_UnitTestCase {
/**
* @covers ::wp_new_comment
*/
public function test_comment_field_lengths() {
public function test_wp_new_comment_respects_comment_field_lengths() {
$data = array(
'comment_post_ID' => self::$post_id,
'comment_author' => 'Comment Author',
@ -539,11 +539,13 @@ class Tests_Comment extends WP_UnitTestCase {
$comment = get_comment( $id );
$this->assertSame( strlen( $comment->comment_content ), 65535 );
$this->assertSame( 65535, strlen( $comment->comment_content ) );
}
/**
* @ticket 56244
*
* @covers ::wp_new_comment
*/
public function test_wp_new_comment_sends_all_expected_parameters_to_preprocess_comment_filter() {
$user = get_userdata( self::$user_id );