From fa7b1bbb99b07a62e2622794a5ae43f803827aca Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 20 Jul 2020 15:47:37 +0000 Subject: [PATCH] Tests: Simplify some assertions in `phpunit/tests/media.php`. Correct comments per the documentation standards. Follow-up to [48496]. See #22101. git-svn-id: https://develop.svn.wordpress.org/trunk@48516 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/media.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/phpunit/tests/media.php b/tests/phpunit/tests/media.php index e5fd11dadc..09f3003773 100644 --- a/tests/phpunit/tests/media.php +++ b/tests/phpunit/tests/media.php @@ -2947,14 +2947,14 @@ EOF; $this->assertTrue( wp_image_file_matches_image_meta( $image_src, $image_meta ) ); } - /** - * @ticket 22101 - */ + /** + * @ticket 22101 + */ function test_gallery_shortcode_when_is_feed_true() { $this->go_to( '/?feed=rss2' ); - // Default: Links to image attachment page url + // Default: Links to image attachment page URL. $actual = gallery_shortcode( array( 'ids' => self::$large_id, @@ -2962,23 +2962,23 @@ EOF; ); $this->assertContains( '?attachment_id=', $actual ); - // File: Links to image file url + // File: Links to image file URL. $actual = gallery_shortcode( array( 'ids' => self::$large_id, 'link' => 'file', ) ); - $this->assertTrue( 2 === substr_count( $actual, '.jpg' ) ); + $this->assertEquals( 2, substr_count( $actual, '.jpg' ) ); - // None: Does not link + // None: Does not link. $actual = gallery_shortcode( array( 'ids' => self::$large_id, 'link' => 'none', ) ); - $this->assertFalse( strpos( $actual, 'assertNotContains( '