WordPress.org

Make WordPress Core

Changeset 41016


Ignore:
Timestamp:
07/06/2017 11:57:31 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Media: Correct the order of arguments passed to assertions in Tests_Image_Header.

Props danielbachhuber.
See #41216.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/image/header.php

    r35309 r41016  
    2727            'height' => 1200,
    2828        ) );
    29         $this->assertEquals( $dimensions['dst_width'], 1200);
    30         $this->assertEquals( $dimensions['dst_height'], 230);
     29        $this->assertEquals( 1200, $dimensions['dst_width'] );
     30        $this->assertEquals( 230, $dimensions['dst_height'] );
    3131
    3232    }
     
    4545            'height' => 1200,
    4646        ) );
    47         $this->assertEquals( $dimensions['dst_width'], 1200);
    48         $this->assertEquals( $dimensions['dst_height'], 230);
     47        $this->assertEquals( 1200, $dimensions['dst_width'] );
     48        $this->assertEquals( 230, $dimensions['dst_height'] );
    4949
    5050    }
     
    6363            'height' => 1200,
    6464        ) );
    65         $this->assertEquals( $dimensions['dst_width'], 1200);
    66         $this->assertEquals( $dimensions['dst_height'], 900);
     65        $this->assertEquals( 1200, $dimensions['dst_width'] );
     66        $this->assertEquals( 900, $dimensions['dst_height'] );
    6767
    6868    }
     
    8181            'height' => 1200,
    8282        ) );
    83         $this->assertEquals( $dimensions['dst_width'], 1500); // max width
    84         $this->assertEquals( $dimensions['dst_height'], 230);
     83        $this->assertEquals( 1500, $dimensions['dst_width'] ); // max width
     84        $this->assertEquals( 230, $dimensions['dst_height'] );
    8585
    8686    }
     
    9999            'height' => 1200,
    100100        ) );
    101         $this->assertEquals( $dimensions['dst_width'], 1600);
    102         $this->assertEquals( $dimensions['dst_height'], 1200);
     101        $this->assertEquals( 1600, $dimensions['dst_width'] );
     102        $this->assertEquals( 1200, $dimensions['dst_height'] );
    103103
    104104    }
     
    115115
    116116        $object = $this->custom_image_header->create_attachment_object( $cropped, $id );
    117         $this->assertEquals( $object['post_title'], 'foo-cropped.png' );
    118         $this->assertEquals( $object['guid'], $cropped );
    119         $this->assertEquals( $object['context'], 'custom-header' );
    120         $this->assertEquals( $object['post_mime_type'], 'image/jpeg' );
     117        $this->assertEquals( 'foo-cropped.png', $object['post_title'] );
     118        $this->assertEquals( $cropped, $object['guid'] );
     119        $this->assertEquals( 'custom-header', $object['context'] );
     120        $this->assertEquals( 'image/jpeg', $object['post_mime_type'] );
    121121    }
    122122
Note: See TracChangeset for help on using the changeset viewer.