WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/08/2019 12:55:20 AM (2 years ago)
Author:
pento
Message:

Coding Standards: Fix the remaining issues in /tests.

All PHP files in /tests now conform to the PHP coding standards, or have exceptions appropriately marked.

Travis now also runs phpcs on the /tests directory, any future changes to these files must conform entirely to the WordPress PHP coding standards. 🎉

See #47632.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/media.php

    r45424 r45607  
    12571257     */
    12581258    function filter_wp_embed_shortcode_custom( $content, $url ) {
    1259         if ( 'https://www.example.com/?video=1' == $url ) {
     1259        if ( 'https://www.example.com/?video=1' === $url ) {
    12601260            $content = '@embed URL was replaced@';
    12611261        }
     
    14471447        foreach ( $image_meta['sizes'] as $name => $size ) {
    14481448            // Whitelist the sizes that should be included so we pick up 'medium_large' in 4.4.
    1449             if ( in_array( $name, $intermediates ) ) {
     1449            if ( in_array( $name, $intermediates, true ) ) {
    14501450                $expected .= $uploads_dir_url . $year_month . '/' . $size['file'] . ' ' . $size['width'] . 'w, ';
    14511451            }
     
    14921492        foreach ( $image_meta['sizes'] as $name => $size ) {
    14931493            // Whitelist the sizes that should be included so we pick up 'medium_large' in 4.4.
    1494             if ( in_array( $name, $intermediates ) ) {
     1494            if ( in_array( $name, $intermediates, true ) ) {
    14951495                $expected .= $uploads_dir_url . $size['file'] . ' ' . $size['width'] . 'w, ';
    14961496            }
     
    15691569        foreach ( $image_meta['sizes'] as $name => $size ) {
    15701570            // Whitelist the sizes that should be included so we pick up 'medium_large' in 4.4.
    1571             if ( in_array( $name, $intermediates ) ) {
     1571            if ( in_array( $name, $intermediates, true ) ) {
    15721572                $expected .= $uploads_dir_url . $year_month . '/' . $size['file'] . ' ' . $size['width'] . 'w, ';
    15731573            }
     
    18481848        foreach ( $image_meta['sizes'] as $name => $size ) {
    18491849            // Whitelist the sizes that should be included so we pick up 'medium_large' in 4.4.
    1850             if ( in_array( $name, $intermediates ) ) {
     1850            if ( in_array( $name, $intermediates, true ) ) {
    18511851                $expected .= $uploads_dir . $year_month . '/' . $size['file'] . ' ' . $size['width'] . 'w, ';
    18521852            }
Note: See TracChangeset for help on using the changeset viewer.