Changeset 48937 for trunk/tests/phpunit/tests/post/thumbnails.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/thumbnails.php
r48310 r48937 61 61 set_post_thumbnail( self::$post, self::$attachment_id ); 62 62 63 $this->assert Equals( self::$attachment_id, get_post_thumbnail_id( self::$post ) );64 $this->assert Equals( self::$attachment_id, get_post_thumbnail_id( self::$post->ID ) );65 66 $GLOBALS['post'] = self::$post; 67 68 $this->assert Equals( self::$attachment_id, get_post_thumbnail_id() );63 $this->assertSame( self::$attachment_id, get_post_thumbnail_id( self::$post ) ); 64 $this->assertSame( self::$attachment_id, get_post_thumbnail_id( self::$post->ID ) ); 65 66 $GLOBALS['post'] = self::$post; 67 68 $this->assertSame( self::$attachment_id, get_post_thumbnail_id() ); 69 69 } 70 70 … … 91 91 */ 92 92 function test_get_the_post_thumbnail_caption() { 93 $this->assert Equals( '', get_the_post_thumbnail_caption() );93 $this->assertSame( '', get_the_post_thumbnail_caption() ); 94 94 95 95 $caption = 'This is a caption.'; … … 108 108 set_post_thumbnail( $post_id, $attachment_id ); 109 109 110 $this->assert Equals( $caption, get_the_post_thumbnail_caption( $post_id ) );110 $this->assertSame( $caption, get_the_post_thumbnail_caption( $post_id ) ); 111 111 } 112 112 … … 128 128 set_post_thumbnail( $post_id, $attachment_id ); 129 129 130 $this->assert Equals( '', get_the_post_thumbnail_caption( $post_id ) );130 $this->assertSame( '', get_the_post_thumbnail_caption( $post_id ) ); 131 131 } 132 132 … … 155 155 156 156 function test_get_the_post_thumbnail() { 157 $this->assert Equals( '', get_the_post_thumbnail() );158 $this->assert Equals( '', get_the_post_thumbnail( self::$post ) );157 $this->assertSame( '', get_the_post_thumbnail() ); 158 $this->assertSame( '', get_the_post_thumbnail( self::$post ) ); 159 159 set_post_thumbnail( self::$post, self::$attachment_id ); 160 160 … … 168 168 ); 169 169 170 $this->assert Equals( $expected, get_the_post_thumbnail( self::$post ) );171 172 $GLOBALS['post'] = self::$post; 173 174 $this->assert Equals( $expected, get_the_post_thumbnail() );170 $this->assertSame( $expected, get_the_post_thumbnail( self::$post ) ); 171 172 $GLOBALS['post'] = self::$post; 173 174 $this->assertSame( $expected, get_the_post_thumbnail() ); 175 175 } 176 176 … … 211 211 212 212 $this->assertFalse( get_the_post_thumbnail_url() ); 213 $this->assert Equals( wp_get_attachment_url( self::$attachment_id ), get_the_post_thumbnail_url( self::$post ) );214 215 $GLOBALS['post'] = self::$post; 216 217 $this->assert Equals( wp_get_attachment_url( self::$attachment_id ), get_the_post_thumbnail_url() );213 $this->assertSame( wp_get_attachment_url( self::$attachment_id ), get_the_post_thumbnail_url( self::$post ) ); 214 215 $GLOBALS['post'] = self::$post; 216 217 $this->assertSame( wp_get_attachment_url( self::$attachment_id ), get_the_post_thumbnail_url() ); 218 218 } 219 219 … … 308 308 309 309 $thumbnail_id = get_post_thumbnail_id( $post_id ); 310 $this->assert Equals( self::$attachment_id, $thumbnail_id );310 $this->assertSame( self::$attachment_id, $thumbnail_id ); 311 311 312 312 $post_id = wp_insert_post( … … 343 343 344 344 $thumbnail_id = get_post_thumbnail_id( $post_id ); 345 $this->assert Equals( self::$attachment_id, $thumbnail_id );345 $this->assertSame( self::$attachment_id, $thumbnail_id ); 346 346 347 347 // Images do not support featured images.
Note: See TracChangeset
for help on using the changeset viewer.