Make WordPress Core


Ignore:
Timestamp:
07/08/2019 12:55:20 AM (6 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/functions.php

    r45602 r45607  
    845845        $charsets     = mb_detect_order();
    846846        $old_charsets = $charsets;
    847         if ( ! in_array( 'EUC-JP', $charsets ) ) {
     847        if ( ! in_array( 'EUC-JP', $charsets, true ) ) {
    848848            $charsets[] = 'EUC-JP';
    849849            mb_detect_order( $charsets );
     
    870870        $charsets     = mb_detect_order();
    871871        $old_charsets = $charsets;
    872         if ( ! in_array( 'EUC-JP', $charsets ) ) {
     872        if ( ! in_array( 'EUC-JP', $charsets, true ) ) {
    873873            $charsets[] = 'EUC-JP';
    874874            mb_detect_order( $charsets );
     
    966966        $extensions = wp_get_ext_types();
    967967
    968         foreach ( $extensions as $type => $extensionList ) {
    969             foreach ( $extensionList as $extension ) {
     968        foreach ( $extensions as $type => $extension_list ) {
     969            foreach ( $extension_list as $extension ) {
    970970                $this->assertEquals( $type, wp_ext2type( $extension ) );
    971971                $this->assertEquals( $type, wp_ext2type( strtoupper( $extension ) ) );
Note: See TracChangeset for help on using the changeset viewer.