Make WordPress Core


Ignore:
Timestamp:
11/25/2021 07:39:31 PM (3 years ago)
Author:
johnbillion
Message:

Build/Test Tools: Correct the order and naming of expected and actual values in various tests.

This corrects the order of the parameters when used in assertions so if/when they fail the failure message is correct.

See #53363

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/menu/walker-nav-menu.php

    r51657 r52248  
    4242     */
    4343    public function test_noopener_no_referrer_for_target_blank() {
    44         $expected   = '';
     44        $actual     = '';
    4545        $post_id    = $this->factory->post->create();
    4646        $post_title = get_the_title( $post_id );
     
    6262        );
    6363
    64         $this->walker->start_el( $expected, (object) $item, 0, (object) $args );
     64        $this->walker->start_el( $actual, (object) $item, 0, (object) $args );
    6565
    66         $this->assertSame( "<li id=\"menu-item-{$post_id}\" class=\"menu-item-{$post_id}\"><a target=\"_blank\" rel=\"noopener\">{$post_title}</a>", $expected );
     66        $this->assertSame( "<li id=\"menu-item-{$post_id}\" class=\"menu-item-{$post_id}\"><a target=\"_blank\" rel=\"noopener\">{$post_title}</a>", $actual );
    6767    }
    6868
Note: See TracChangeset for help on using the changeset viewer.