mirrored from git://develop.git.wordpress.org/
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract get_hooked_block_markup function
- Loading branch information
Showing
2 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
/** | ||
* Tests for the get_hooked_block_markup function. | ||
* | ||
* @package WordPress | ||
* @subpackage Blocks | ||
* | ||
* @since 6.5.0 | ||
* | ||
* @group blocks | ||
* @group block-hooks | ||
*/ | ||
class Tests_Blocks_InsertHookedBlock extends WP_UnitTestCase { | ||
/** | ||
* @covers ::get_hooked_block_markup | ||
*/ | ||
public function test_get_hooked_block_markup() { | ||
$anchor_block = array( | ||
'blockName' => 'tests/anchor-block', | ||
); | ||
|
||
$actual = get_hooked_block_markup( $anchor_block, 'tests/hooked-block' ); | ||
$this->assertSame( '<!-- wp:tests/hooked-block /-->', $actual ); | ||
} | ||
} |