Make WordPress Core


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

    r42343 r45607  
    9595
    9696        // trash, spam, delete should make the total go down
    97         if ( in_array( $action, array( 'trash', 'spam', 'delete' ) ) ) {
     97        if ( in_array( $action, array( 'trash', 'spam', 'delete' ), true ) ) {
    9898            $total = $_POST['_total'] - 1;
    9999
    100100            // unspam, untrash should make the total go up
    101         } elseif ( in_array( $action, array( 'untrash', 'unspam' ) ) ) {
     101        } elseif ( in_array( $action, array( 'untrash', 'unspam' ), true ) ) {
    102102            $total = $_POST['_total'] + 1;
    103103        }
     
    109109        // Check for either possible total
    110110        $message = sprintf( 'returned value: %1$d $total: %2$d  $recalc_total: %3$d', (int) $xml->response[0]->comment[0]->supplemental[0]->total[0], $total, $recalc_total );
    111         $this->assertTrue( in_array( (int) $xml->response[0]->comment[0]->supplemental[0]->total[0], array( $total, $recalc_total ) ), $message );
     111        $this->assertTrue( in_array( (int) $xml->response[0]->comment[0]->supplemental[0]->total[0], array( $total, $recalc_total ), true ), $message );
    112112    }
    113113
     
    244244
    245245        // Force delete the comment
    246         if ( 'delete' == $action ) {
     246        if ( 'delete' === $action ) {
    247247            wp_delete_comment( $comment->comment_ID, true );
    248248        }
Note: See TracChangeset for help on using the changeset viewer.