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/xmlrpc/wp/getPages.php

    r42343 r45607  
    5656
    5757    function remove_editor_edit_page_cap( $caps, $cap, $user_id, $args ) {
    58         if ( in_array( $cap, array( 'edit_page', 'edit_others_pages' ) ) ) {
    59             if ( $user_id == self::$editor_id && $args[0] == self::$post_id ) {
     58        if ( in_array( $cap, array( 'edit_page', 'edit_others_pages' ), true ) ) {
     59            if ( $user_id === self::$editor_id && $args[0] === self::$post_id ) {
    6060                return array( false );
    6161            }
     
    7979            $this->assertNotIXRError( $result );
    8080
    81             if ( $result['page_id'] == self::$post_id ) {
     81            if ( $result['page_id'] === self::$post_id ) {
    8282                $found_incapable = true;
    8383                break;
Note: See TracChangeset for help on using the changeset viewer.