Make WordPress Core


Ignore:
Timestamp:
11/25/2021 07:39:31 PM (2 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/widgets/wpWidgetCustomHtml.php

    r52010 r52248  
    186186        );
    187187        $result   = $widget->update( $instance, array() );
    188         $this->assertSame( $result, $expected );
     188        $this->assertSame( $expected, $result );
    189189
    190190        // Make sure KSES is applying as expected.
     
    194194        $expected['content'] = $instance['content'];
    195195        $result              = $widget->update( $instance, array() );
    196         $this->assertSame( $result, $expected );
     196        $this->assertSame( $expected, $result );
    197197        remove_filter( 'map_meta_cap', array( $this, 'grant_unfiltered_html_cap' ) );
    198198
     
    202202        $expected['content'] = wp_kses_post( $instance['content'] );
    203203        $result              = $widget->update( $instance, array() );
    204         $this->assertSame( $result, $expected );
     204        $this->assertSame( $expected, $result );
    205205        remove_filter( 'map_meta_cap', array( $this, 'revoke_unfiltered_html_cap' ), 10 );
    206206    }
Note: See TracChangeset for help on using the changeset viewer.