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/image/functions.php

    r52010 r52248  
    627627        $metadata = wp_generate_attachment_metadata( $attachment_id, $test_file );
    628628        $this->assertArrayHasKey( 'test-size', $metadata['sizes'], 'The `test-size` was not added to the metadata.' );
    629         $this->assertSame( $metadata['sizes']['test-size'], $expected );
     629        $this->assertSame( $expected, $metadata['sizes']['test-size'] );
    630630
    631631        remove_image_size( 'test-size' );
Note: See TracChangeset for help on using the changeset viewer.