- Timestamp:
- 12/17/2024 10:35:17 AM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/blocks/applyBlockHooksToContent.php
r59124 r59523 93 93 94 94 /** 95 * @ticket 61074 96 */ 97 public function test_apply_block_hooks_to_content_with_context_set_to_null() { 98 $content = '<!-- wp:tests/anchor-block /-->'; 99 100 /* 101 * apply_block_hooks_to_content() will fall back to the global $post object (via get_post()) 102 * if the $context parameter is null. However, we'd also like to ensure that the function 103 * works as expected even when get_post() returns null. 104 */ 105 $this->assertNull( get_post() ); 106 107 $actual = apply_block_hooks_to_content( $content, null, 'insert_hooked_blocks' ); 108 $this->assertSame( 109 '<!-- wp:tests/anchor-block /--><!-- wp:tests/hooked-block /-->', 110 $actual 111 ); 112 } 113 114 /** 95 115 * @ticket 61902 96 116 */
Note: See TracChangeset
for help on using the changeset viewer.