WordPress.org

Make WordPress Core


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

    r52010 r52248  
    133133        );
    134134        $result   = $widget->update( $expected, $instance );
    135         $this->assertSame( $result, $expected );
     135        $this->assertSame( $expected, $result );
    136136
    137137        // Should filter invalid attachment ID.
     
    149149        );
    150150        $result   = $widget->update( $expected, $instance );
    151         $this->assertSame( $result, $expected );
     151        $this->assertSame( $expected, $result );
    152152
    153153        // Should filter invalid attachment url.
     
    166166        );
    167167        $result   = $widget->update( $expected, $instance );
    168         $this->assertSame( $result, $expected );
     168        $this->assertSame( $expected, $result );
    169169
    170170        // Should filter invalid attachment title.
     
    182182        );
    183183        $result   = $widget->update( $expected, $instance );
    184         $this->assertSame( $result, $expected );
     184        $this->assertSame( $expected, $result );
    185185
    186186        // Should filter invalid image size.
     
    198198        );
    199199        $result   = $widget->update( $expected, $instance );
    200         $this->assertSame( $result, $expected );
     200        $this->assertSame( $expected, $result );
    201201
    202202        // Should filter invalid image width.
     
    214214        );
    215215        $result   = $widget->update( $expected, $instance );
    216         $this->assertSame( $result, $expected );
     216        $this->assertSame( $expected, $result );
    217217
    218218        // Should filter invalid image height.
     
    230230        );
    231231        $result   = $widget->update( $expected, $instance );
    232         $this->assertSame( $result, $expected );
     232        $this->assertSame( $expected, $result );
    233233
    234234        // Should filter invalid image caption.
     
    251251        );
    252252        $result   = $widget->update( $expected, $instance );
    253         $this->assertSame( $result, $expected );
     253        $this->assertSame( $expected, $result );
    254254
    255255        // Should filter invalid alt text.
     
    272272        );
    273273        $result   = $widget->update( $expected, $instance );
    274         $this->assertSame( $result, $expected );
     274        $this->assertSame( $expected, $result );
    275275
    276276        // Should filter invalid link type.
     
    288288        );
    289289        $result   = $widget->update( $expected, $instance );
    290         $this->assertSame( $result, $expected );
     290        $this->assertSame( $expected, $result );
    291291
    292292        // Should filter invalid link url.
     
    305305        );
    306306        $result   = $widget->update( $expected, $instance );
    307         $this->assertSame( $result, $expected );
     307        $this->assertSame( $expected, $result );
    308308
    309309        // Should filter invalid image classes.
     
    326326        );
    327327        $result   = $widget->update( $expected, $instance );
    328         $this->assertSame( $result, $expected );
     328        $this->assertSame( $expected, $result );
    329329
    330330        // Should filter invalid link classes.
     
    347347        );
    348348        $result   = $widget->update( $expected, $instance );
    349         $this->assertSame( $result, $expected );
     349        $this->assertSame( $expected, $result );
    350350
    351351        // Should filter invalid rel text.
     
    368368        );
    369369        $result   = $widget->update( $expected, $instance );
    370         $this->assertSame( $result, $expected );
     370        $this->assertSame( $expected, $result );
    371371
    372372        // Should filter invalid  link target.
     
    384384        );
    385385        $result   = $widget->update( $expected, $instance );
    386         $this->assertSame( $result, $expected );
     386        $this->assertSame( $expected, $result );
    387387
    388388        // Should filter invalid image title.
Note: See TracChangeset for help on using the changeset viewer.