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/feed/atom.php

    r43571 r45607  
    7272        global $post;
    7373        try {
     74            // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
    7475            @require( ABSPATH . 'wp-includes/feed-atom.php' );
    7576            $out = ob_get_clean();
     
    163164            $link_alts = xml_find( $entries[ $key ]['child'], 'link' );
    164165            foreach ( $link_alts as $link_alt ) {
    165                 if ( 'alternate' == $link_alt['attributes']['rel'] ) {
     166                if ( 'alternate' === $link_alt['attributes']['rel'] ) {
    166167                    $this->assertEquals( get_permalink( $post ), $link_alt['attributes']['href'] );
    167168                }
     
    186187            $categories = xml_find( $entries[ $key ]['child'], 'category' );
    187188            foreach ( $categories as $category ) {
    188                 $this->assertTrue( in_array( $category['attributes']['term'], $terms ) );
     189                $this->assertTrue( in_array( $category['attributes']['term'], $terms, true ) );
    189190            }
    190191            unset( $terms );
     
    199200            $link_replies = xml_find( $entries[ $key ]['child'], 'link' );
    200201            foreach ( $link_replies as $link_reply ) {
    201                 if ( 'replies' == $link_reply['attributes']['rel'] && 'application/atom+xml' == $link_reply['attributes']['type'] ) {
     202                if ( 'replies' === $link_reply['attributes']['rel'] && 'application/atom+xml' === $link_reply['attributes']['type'] ) {
    202203                    $this->assertEquals( get_post_comments_feed_link( $post->ID, 'atom' ), $link_reply['attributes']['href'] );
    203204                }
Note: See TracChangeset for help on using the changeset viewer.