Changeset 48937 for trunk/tests/phpunit/tests/comment/getPageOfComment.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment/getPageOfComment.php
r48133 r48937 29 29 $comment_first = self::factory()->comment->create_post_comments( $p, 1, array( 'comment_date' => '2013-09-14 00:00:00' ) ); 30 30 31 $this->assert Equals( 4, get_page_of_comment( $comment_last[0], array( 'per_page' => 3 ) ) );32 $this->assert Equals( 2, get_page_of_comment( $comment_last[0], array( 'per_page' => 10 ) ) );33 34 $this->assert Equals( 1, get_page_of_comment( $comment_first[0], array( 'per_page' => 3 ) ) );35 $this->assert Equals( 1, get_page_of_comment( $comment_first[0], array( 'per_page' => 10 ) ) );31 $this->assertSame( 4, get_page_of_comment( $comment_last[0], array( 'per_page' => 3 ) ) ); 32 $this->assertSame( 2, get_page_of_comment( $comment_last[0], array( 'per_page' => 10 ) ) ); 33 34 $this->assertSame( 1, get_page_of_comment( $comment_first[0], array( 'per_page' => 3 ) ) ); 35 $this->assertSame( 1, get_page_of_comment( $comment_first[0], array( 'per_page' => 10 ) ) ); 36 36 } 37 37 … … 64 64 } 65 65 66 $this->assert Equals(66 $this->assertSame( 67 67 2, 68 68 get_page_of_comment( … … 74 74 ) 75 75 ); 76 $this->assert Equals(76 $this->assertSame( 77 77 3, 78 78 get_page_of_comment( … … 84 84 ) 85 85 ); 86 $this->assert Equals(86 $this->assertSame( 87 87 5, 88 88 get_page_of_comment( … … 149 149 ) 150 150 ); 151 $this->assert Equals( 2, $page_trackbacks );151 $this->assertSame( 2, $page_trackbacks ); 152 152 153 153 $num_queries = $wpdb->num_queries; … … 159 159 ) 160 160 ); 161 $this->assert Equals( 1, $page_comments );161 $this->assertSame( 1, $page_comments ); 162 162 163 163 $this->assertNotEquals( $num_queries, $wpdb->num_queries ); … … 244 244 ); 245 245 246 $this->assert Equals( 1, get_page_of_comment( $c1, array( 'per_page' => 2 ) ) );246 $this->assertSame( 1, get_page_of_comment( $c1, array( 'per_page' => 2 ) ) ); 247 247 248 248 wp_set_comment_status( $c3, '1' ); 249 249 250 $this->assert Equals( 2, get_page_of_comment( $c1, array( 'per_page' => 2 ) ) );250 $this->assertSame( 2, get_page_of_comment( $c1, array( 'per_page' => 2 ) ) ); 251 251 } 252 252 … … 276 276 277 277 $found_0 = get_page_of_comment( $comments_0[0], array( 'per_page' => 2 ) ); 278 $this->assert Equals( 3, $found_0 );278 $this->assertSame( 3, $found_0 ); 279 279 280 280 $found_1 = get_page_of_comment( $comments_1[1], array( 'per_page' => 2 ) ); 281 $this->assert Equals( 2, $found_1 );281 $this->assertSame( 2, $found_1 ); 282 282 } 283 283 … … 358 358 update_option( 'comments_per_page', 2 ); 359 359 360 $this->assert Equals( 2, get_page_of_comment( $c1 ) );360 $this->assertSame( 2, get_page_of_comment( $c1 ) ); 361 361 } 362 362 … … 398 398 update_option( 'comments_per_page', 1 ); 399 399 400 $this->assert Equals( 2, get_page_of_comment( $c3 ) );400 $this->assertSame( 2, get_page_of_comment( $c3 ) ); 401 401 } 402 402 … … 438 438 update_option( 'comments_per_page', 1 ); 439 439 440 $this->assert Equals( 2, get_page_of_comment( $c3 ) );440 $this->assertSame( 2, get_page_of_comment( $c3 ) ); 441 441 } 442 442
Note: See TracChangeset
for help on using the changeset viewer.