Changeset 57676
- Timestamp:
- 02/21/2024 10:47:49 AM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/blocks/setIgnoredHookedBlocksMetadata.php
r57668 r57676 164 164 165 165 $filter = function ( $parsed_hooked_block, $hooked_block_type, $relative_position, $parsed_anchor_block ) { 166 if ( 'tests/anchor-block' === $parsed_anchor_block['blockName'] && 'after' === $relative_position ) { 166 if ( 167 'tests/hooked-block-suppressed-by-filter' === $hooked_block_type && 168 'after' === $relative_position && 169 'tests/anchor-block' === $parsed_anchor_block['blockName'] 170 ) { 167 171 return null; 168 172 } … … 171 175 }; 172 176 173 add_filter( 'hooked_block _tests/hooked-block-suppressed-by-filter', $filter, 10, 4 );177 add_filter( 'hooked_block', $filter, 10, 4 ); 174 178 set_ignored_hooked_blocks_metadata( $anchor_block, 'after', $hooked_blocks, null ); 175 remove_filter( 'hooked_block _tests/hooked-block-suppressed-by-filter', $filter );179 remove_filter( 'hooked_block', $filter ); 176 180 177 181 $this->assertSame( array( 'tests/hooked-block' ), $anchor_block['attrs']['metadata']['ignoredHookedBlocks'] );
Note: See TracChangeset
for help on using the changeset viewer.