WordPress.org

Make WordPress Core

Changeset 48516


Ignore:
Timestamp:
07/20/2020 03:47:37 PM (2 months ago)
Author:
SergeyBiryukov
Message:

Tests: Simplify some assertions in phpunit/tests/media.php.

Correct comments per the documentation standards.

Follow-up to [48496].

See #22101.

File:
1 edited

Legend:

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

    r48496 r48516  
    29482948    }
    29492949
    2950         /**
    2951         * @ticket 22101
    2952         */
     2950    /**
     2951    * @ticket 22101
     2952    */
    29532953    function test_gallery_shortcode_when_is_feed_true() {
    29542954
    29552955        $this->go_to( '/?feed=rss2' );
    29562956
    2957         // Default: Links to image attachment page url
     2957        // Default: Links to image attachment page URL.
    29582958        $actual = gallery_shortcode(
    29592959            array(
     
    29632963        $this->assertContains( '?attachment_id=', $actual );
    29642964
    2965         // File: Links to image file url
     2965        // File: Links to image file URL.
    29662966        $actual = gallery_shortcode(
    29672967            array(
     
    29702970            )
    29712971        );
    2972         $this->assertTrue( 2 === substr_count( $actual, '.jpg' ) );
    2973 
    2974         // None: Does not link
     2972        $this->assertEquals( 2, substr_count( $actual, '.jpg' ) );
     2973
     2974        // None: Does not link.
    29752975        $actual = gallery_shortcode(
    29762976            array(
     
    29792979            )
    29802980        );
    2981         $this->assertFalse( strpos( $actual, '<a ' ) );
     2981        $this->assertNotContains( '<a ', $actual );
    29822982    }
    29832983
Note: See TracChangeset for help on using the changeset viewer.