Skip to content

Commit 851f537

Browse files
author
lancewillett
committed
Tests: Strengthen Recent Comments widget XHTML coverage.
Assert that the Recent Comments widget still renders five comments in XHTML mode, alongside the existing check that it omits the navigation wrapper. This prevents empty output from satisfying the negative assertion. Developed in: #14338 Props shailu25. See #65819. git-svn-id: https://develop.svn.wordpress.org/trunk@64418 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 916509e commit 851f537

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎tests/phpunit/tests/widgets/wpWidgetRecentComments.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@ public function test_widget_omits_navigation_wrapper_in_xhtml() {
588588
$processor = new WP_HTML_Tag_Processor( $output );
589589

590590
$this->assertFalse( $processor->next_tag( 'NAV' ), 'The output should not contain a nav tag in xhtml format.' );
591+
$this->assertCount( 5, $this->get_listed_authors( $output ), 'The comments should still be listed.' );
591592
}
592593

593594
/**

0 commit comments

Comments
 (0)