Changeset 56701
- Timestamp:
- 09/26/2023 08:07:07 AM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/blocks/serialize.php
r56649 r56701 236 236 $this->assertSame( $original, $actual ); 237 237 } 238 239 /** 240 * @ticket 59313 241 * 242 * @covers ::traverse_and_serialize_blocks 243 */ 244 public function test_traverse_and_serialize_blocks_do_not_insert_in_void_block() { 245 $markup = '<!-- wp:void /-->'; 246 $blocks = parse_blocks( $markup ); 247 248 $actual = traverse_and_serialize_blocks( 249 $blocks, 250 array( __CLASS__, 'insert_next_to_child_blocks_callback' ), 251 array( __CLASS__, 'insert_next_to_child_blocks_callback' ) 252 ); 253 254 $this->assertSame( $markup, $actual ); 255 } 256 257 /** 258 * @ticket 59313 259 * 260 * @covers ::traverse_and_serialize_blocks 261 */ 262 public function test_traverse_and_serialize_blocks_do_not_insert_in_empty_parent_block() { 263 $markup = '<!-- wp:outer --><div class="wp-block-outer"></div><!-- /wp:outer -->'; 264 $blocks = parse_blocks( $markup ); 265 266 $actual = traverse_and_serialize_blocks( 267 $blocks, 268 array( __CLASS__, 'insert_next_to_child_blocks_callback' ), 269 array( __CLASS__, 'insert_next_to_child_blocks_callback' ) 270 ); 271 272 $this->assertSame( $markup, $actual ); 273 } 238 274 }
Note: See TracChangeset
for help on using the changeset viewer.