- Timestamp:
- 05/02/2024 06:59:30 AM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/block-supports/wpRenderElementsSupport.php
r56943 r58074 45 45 46 46 $block_markup = '<p>Hello <a href="http://www.wordpress.org/">WordPress</a>!</p>'; 47 $actual = wp_render_elements_ support( $block_markup, $block );47 $actual = wp_render_elements_class_name( $block_markup, $block ); 48 48 49 49 $this->assertSame( $block_markup, $actual, 'Expected to leave block content unmodified, but found changes.' ); … … 91 91 ); 92 92 93 $actual = wp_render_elements_support( $block_markup, $block ); 93 /* 94 * To ensure a consistent elements class name it is generated within a 95 * `render_block_data` filter and stored in the `className` attribute. 96 * As a result, the block data needs to be passed through the same 97 * function for this test. 98 */ 99 $filtered_block = wp_render_elements_support_styles( $block ); 100 $actual = wp_render_elements_class_name( $block_markup, $filtered_block ); 94 101 95 102 $this->assertMatchesRegularExpression(
Note: See TracChangeset
for help on using the changeset viewer.