Changeset 57650
- Timestamp:
- 02/17/2024 04:32:37 PM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment/getCommentsPagesCount.php
r54402 r57650 79 79 $comments = get_comments( array( 'post_id' => $post->ID ) ); 80 80 81 $this->assert Equals( 3, get_comment_pages_count( $comments, 10, false ) );82 $this->assert Equals( 2, get_comment_pages_count( $comments, 10, true ) );83 $this->assert Equals( 4, get_comment_pages_count( $comments, 4, true ) );81 $this->assertSame( 3, get_comment_pages_count( $comments, 10, false ) ); 82 $this->assertSame( 2, get_comment_pages_count( $comments, 10, true ) ); 83 $this->assertSame( 4, get_comment_pages_count( $comments, 4, true ) ); 84 84 } 85 85 … … 102 102 update_option( 'thread_comments', false ); 103 103 104 $this->assert Equals( 3, get_comment_pages_count( $comments, 10, false ) );105 $this->assert Equals( 2, get_comment_pages_count( $comments, 10, true ) );106 $this->assert Equals( 3, get_comment_pages_count( $comments, 10, null ) );107 $this->assert Equals( 3, get_comment_pages_count( $comments, 10 ) );104 $this->assertSame( 3, get_comment_pages_count( $comments, 10, false ) ); 105 $this->assertSame( 2, get_comment_pages_count( $comments, 10, true ) ); 106 $this->assertSame( 3, get_comment_pages_count( $comments, 10, null ) ); 107 $this->assertSame( 3, get_comment_pages_count( $comments, 10 ) ); 108 108 109 109 update_option( 'thread_comments', true ); 110 110 111 $this->assert Equals( 3, get_comment_pages_count( $comments, 10, false ) );112 $this->assert Equals( 2, get_comment_pages_count( $comments, 10, true ) );113 $this->assert Equals( 2, get_comment_pages_count( $comments, 10, null ) );114 $this->assert Equals( 2, get_comment_pages_count( $comments, 10 ) );111 $this->assertSame( 3, get_comment_pages_count( $comments, 10, false ) ); 112 $this->assertSame( 2, get_comment_pages_count( $comments, 10, true ) ); 113 $this->assertSame( 2, get_comment_pages_count( $comments, 10, null ) ); 114 $this->assertSame( 2, get_comment_pages_count( $comments, 10 ) ); 115 115 } 116 116 … … 141 141 update_option( 'comments_per_page', 25 ); 142 142 143 $this->assert Equals( 3, get_comment_pages_count() );144 $this->assert Equals( 2, get_comment_pages_count( null, 20 ) );143 $this->assertSame( 3, get_comment_pages_count() ); 144 $this->assertSame( 2, get_comment_pages_count( null, 20 ) ); 145 145 146 146 $wp_query = new WP_Query( … … 152 152 ); 153 153 154 $this->assert Equals( 1, get_comment_pages_count() );155 $this->assert Equals( 5, get_comment_pages_count( null, 5 ) );154 $this->assertSame( 1, get_comment_pages_count() ); 155 $this->assertSame( 5, get_comment_pages_count( null, 5 ) ); 156 156 157 157 $wp_query->query_vars['comments_per_page'] = null; … … 159 159 update_option( 'comments_per_page', 5 ); 160 160 161 $this->assert Equals( 5, get_comment_pages_count() );162 $this->assert Equals( 3, get_comment_pages_count( null, 11 ) );163 $this->assert Equals( 5, get_comment_pages_count( null, 0 ) );161 $this->assertSame( 5, get_comment_pages_count() ); 162 $this->assertSame( 3, get_comment_pages_count( null, 11 ) ); 163 $this->assertSame( 5, get_comment_pages_count( null, 0 ) ); 164 164 } 165 165
Note: See TracChangeset
for help on using the changeset viewer.