Skip to content

Commit

Permalink
Try adding at top level
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Apr 20, 2022
1 parent e9e5a2f commit feb1ad4
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions phpunit/class-block-library-comment-template-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,17 @@ function test_rendering_comment_template() {
}

/**
* Test rendering nested comments:
* Test rendering nested comments, and for correct odd/even classes.
*
* └─ comment 1
*   └─ comment 2
*    └─ comment 4
* └─ comment 2
*   └─ comment 3
*    └─ comment 4
*/
function test_rendering_comment_template_nested() {
$first_level_ids = self::factory()->comment->create_post_comments(
self::$custom_post->ID,
2,
1,
array(
'comment_parent' => self::$comment_ids[0],
'comment_author' => 'Test',
Expand Down Expand Up @@ -193,7 +193,17 @@ function test_rendering_comment_template_nested() {
'',
<<<END
<ol >
<li id="comment-{$top_level_ids[0]}" class="comment odd alt thread-odd thread-alt depth-1">
<li id="comment-{$top_level_ids[0]}" class="comment even depth-2">
<div class="has-small-font-size wp-block-comment-author-name">
<a rel="external nofollow ugc" href="http://example.com/author-url/" target="_self" >
Test
</a>
</div>
<div class="wp-block-comment-content">
Hello world
</div>
</li>
<li id="comment-{$top_level_ids[1]}" class="comment odd alt thread-odd thread-alt depth-1">
<div class="has-small-font-size wp-block-comment-author-name">
<a rel="external nofollow ugc" href="http://example.com/author-url/" target="_self" >
Test
Expand Down Expand Up @@ -225,16 +235,6 @@ function test_rendering_comment_template_nested() {
</li>
</ol>
</li>
<li id="comment-{$first_level_ids[1]}" class="comment even depth-2">
<div class="has-small-font-size wp-block-comment-author-name">
<a rel="external nofollow ugc" href="http://example.com/author-url/" target="_self" >
Test
</a>
</div>
<div class="wp-block-comment-content">
Hello world
</div>
</li>
</ol>
</li>
</ol>
Expand Down

0 comments on commit feb1ad4

Please sign in to comment.