Make WordPress Core


Ignore:
Timestamp:
12/08/2022 03:07:45 PM (2 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/comment.php

    r54527 r54949  
    524524     * @covers ::wp_new_comment
    525525     */
    526     public function test_comment_field_lengths() {
     526    public function test_wp_new_comment_respects_comment_field_lengths() {
    527527        $data = array(
    528528            'comment_post_ID'      => self::$post_id,
     
    540540        $comment = get_comment( $id );
    541541
    542         $this->assertSame( strlen( $comment->comment_content ), 65535 );
     542        $this->assertSame( 65535, strlen( $comment->comment_content ) );
    543543    }
    544544
    545545    /**
    546546     * @ticket 56244
     547     *
     548     * @covers ::wp_new_comment
    547549     */
    548550    public function test_wp_new_comment_sends_all_expected_parameters_to_preprocess_comment_filter() {
Note: See TracChangeset for help on using the changeset viewer.