Changeset 48937 for trunk/tests/phpunit/tests/comment.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment.php
r48235 r48937 53 53 ) 54 54 ); 55 $this->assert Equals( 1, $result );55 $this->assertSame( 1, $result ); 56 56 57 57 $comment = get_comment( $comments[0] ); … … 64 64 ) 65 65 ); 66 $this->assert Equals( 0, $result );66 $this->assertSame( 0, $result ); 67 67 68 68 $result = wp_update_comment( … … 91 91 92 92 $comment = get_comment( $comment_id ); 93 $this->assert Equals( 'pingback', $comment->comment_type );93 $this->assertSame( 'pingback', $comment->comment_type ); 94 94 } 95 95 … … 110 110 ); 111 111 112 $this->assert Equals( 'fire', get_comment_meta( $comment_id, 'sauce', true ) );112 $this->assertSame( 'fire', get_comment_meta( $comment_id, 'sauce', true ) ); 113 113 } 114 114 … … 148 148 149 149 $comment = get_comment( $comment_id ); 150 $this->assert Equals( $updated_comment_text, $comment->comment_content );150 $this->assertSame( $updated_comment_text, $comment->comment_content ); 151 151 } 152 152 … … 163 163 ) 164 164 ); 165 $this->assert Same( false,$update );165 $this->assertFalse( $update ); 166 166 167 167 $update = wp_update_comment( … … 171 171 ) 172 172 ); 173 $this->assert Same( false,$update );173 $this->assertFalse( $update ); 174 174 } 175 175 … … 291 291 $comment = get_comment( $id ); 292 292 293 $this->assert Equals( $data['comment_date'], $comment->comment_date );294 $this->assert Equals( $data['comment_date_gmt'], $comment->comment_date_gmt );293 $this->assertSame( $data['comment_date'], $comment->comment_date ); 294 $this->assertSame( $data['comment_date_gmt'], $comment->comment_date_gmt ); 295 295 } 296 296 … … 313 313 $comment = get_comment( $id ); 314 314 315 $this->assert Equals( $data['comment_author_IP'], $comment->comment_author_IP );315 $this->assertSame( $data['comment_author_IP'], $comment->comment_author_IP ); 316 316 } 317 317 … … 334 334 $comment = get_comment( $id ); 335 335 336 $this->assert Equals( $data['comment_author_IP'], $comment->comment_author_IP );336 $this->assertSame( $data['comment_author_IP'], $comment->comment_author_IP ); 337 337 } 338 338 … … 356 356 $comment = get_comment( $id ); 357 357 358 $this->assert Equals( $data['comment_agent'], $comment->comment_agent );358 $this->assertSame( $data['comment_agent'], $comment->comment_agent ); 359 359 } 360 360 … … 378 378 $comment = get_comment( $id ); 379 379 380 $this->assert Equals( 'Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53 Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16 Mozilla/5.0 (Macintosh; U; PPC Mac OS ', $comment->comment_agent );380 $this->assertSame( 'Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53 Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16 Mozilla/5.0 (Macintosh; U; PPC Mac OS ', $comment->comment_agent ); 381 381 } 382 382 … … 400 400 $comment = get_comment( $id ); 401 401 402 $this->assert Equals( $data['comment_agent'], $comment->comment_agent );402 $this->assertSame( $data['comment_agent'], $comment->comment_agent ); 403 403 } 404 404 … … 420 420 $comment = get_comment( $id ); 421 421 422 $this->assert Equals( strlen( $comment->comment_content ), 65535 );422 $this->assertSame( strlen( $comment->comment_content ), 65535 ); 423 423 } 424 424 … … 569 569 ); 570 570 571 $this->assert Equals( 'fire', get_comment_meta( $c, 'sauce', true ) );571 $this->assertSame( 'fire', get_comment_meta( $c, 'sauce', true ) ); 572 572 } 573 573
Note: See TracChangeset
for help on using the changeset viewer.