Make WordPress Core

Changeset 48940


Ignore:
Timestamp:
09/04/2020 07:36:33 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Tests: Replace a few more instances of assertEquals() with assertSame().

These were previously missed due to incorrect capitalization.

Follow-up to [48937], [48939].

See #38266.

Location:
trunk/tests/phpunit/tests
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/admin/includesScreen.php

    r48937 r48940  
    378378
    379379                $screen->add_help_tab( $tab_1_args );
    380                 $this->assertequals( $screen->get_help_tab( $tab_1 ), $tab_1_args );
     380                $this->assertSame( $screen->get_help_tab( $tab_1 ), $tab_1_args );
    381381
    382382                $screen->add_help_tab( $tab_2_args );
  • trunk/tests/phpunit/tests/comment/getCommentsPagesCount.php

    r48937 r48940  
    5959                $this->assertSame( 0, get_comment_pages_count( $comments, 5 ) );
    6060                $this->assertSame( 0, get_comment_pages_count( $comments ) );
    61                 $this->assertequals( 0, get_comment_pages_count( null, 1 ) );
     61                $this->assertSame( 0, get_comment_pages_count( null, 1 ) );
    6262        }
    6363
  • trunk/tests/phpunit/tests/formatting/JSEscape.php

    r48937 r48940  
    3636                $out = esc_js( "foo\rbar\nbaz\r" );
    3737                // \r is stripped.
    38                 $this->assertequals( "foobar\\nbaz", $out );
     38                $this->assertSame( "foobar\\nbaz", $out );
    3939        }
    4040
     
    4242                $out = esc_js( "foo\r\nbar\nbaz\r\n" );
    4343                // \r is stripped.
    44                 $this->assertequals( "foo\\nbar\\nbaz\\n", $out );
     44                $this->assertSame( "foo\\nbar\\nbaz\\n", $out );
    4545        }
    4646}
  • trunk/tests/phpunit/tests/general/wpError.php

    r48939 r48940  
    203203                $this->wp_error->add( 'code', 'message2' );
    204204
    205                 $this->assertequalSets( array( 'message', 'message2' ), $this->wp_error->get_error_messages( 'code' ) );
     205                $this->assertSameSets( array( 'message', 'message2' ), $this->wp_error->get_error_messages( 'code' ) );
    206206        }
    207207
  • trunk/tests/phpunit/tests/rest-api/rest-plugins-controller.php

    r48937 r48940  
    219219                wp_set_current_user( self::$subscriber_id );
    220220                $response = rest_do_request( self::BASE );
    221                 $this->assertequals( 403, $response->get_status() );
     221                $this->assertSame( 403, $response->get_status() );
    222222        }
    223223
Note: See TracChangeset for help on using the changeset viewer.