Skip to content

Commit

Permalink
Improve tests readibility
Browse files Browse the repository at this point in the history
  • Loading branch information
SantosGuillamot committed Sep 20, 2024
1 parent e67471c commit 57bc368
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tests/phpunit/tests/link/getNextCommentsLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ public function test_page_should_respect_value_of_page_argument() {
$this->go_to( get_permalink( $p ) );

// Check setting the query var is ignored.
$cpage = get_query_var( 'cpage' );
$old_cpage = get_query_var( 'cpage' );
set_query_var( 'cpage', 2 );

$link = get_next_comments_link( 'Next', 5, 3 );

$this->assertStringContainsString( 'cpage=4', $link );
set_query_var( 'cpage', $old_cpage );

set_query_var( 'cpage', $cpage );
$this->assertStringContainsString( 'cpage=4', $link );
}
}
6 changes: 3 additions & 3 deletions tests/phpunit/tests/link/getPreviousCommentsLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ public function test_page_should_respect_value_of_page_argument() {
$this->go_to( get_permalink( $p ) );

// Check setting the query var is ignored.
$cpage = get_query_var( 'cpage' );
$old_cpage = get_query_var( 'cpage' );
set_query_var( 'cpage', 4 );

$link = get_previous_comments_link( 'Previous', 3 );

$this->assertStringContainsString( 'cpage=2', $link );
set_query_var( 'cpage', $old_cpage );

set_query_var( 'cpage', $cpage );
$this->assertStringContainsString( 'cpage=2', $link );
}
}

0 comments on commit 57bc368

Please sign in to comment.