Skip to content

Commit

Permalink
Add more specific assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed May 30, 2023
1 parent 1082780 commit 703e6c7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions phpunit/blocks/render-comment-template-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,15 @@ public function test_inner_block_inserted_by_render_block_data_is_retained() {
$this->assertSame( 'core/comment-content', $args[0][2]->name );
$this->assertSame( 'core/comment-template', $args[1][2]->name );
$this->assertCount( 2, $args[1][2]->inner_blocks, "Inner block inserted by render_block_data filter wasn't retained." );
$this->assertInstanceOf(
'WP_Block',
$args[1][2]->inner_blocks[1],
"Inner block inserted by render_block_data isn't a WP_Block class instance."
);
$this->assertSame(
'core/social-links',
$args[1][2]->inner_blocks[1]->name,
"Inner block inserted by render_block_data isn't named as expected."
);
}
}

0 comments on commit 703e6c7

Please sign in to comment.