Changeset 54889 for trunk/tests/phpunit/tests/block-template-utils.php
- Timestamp:
- 11/29/2022 12:32:37 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/block-template-utils.php
r54860 r54889 132 132 * @covers ::_build_block_template_result_from_post 133 133 */ 134 function test_build_block_template_result_from_post_with_child_theme() {134 public function test_build_block_template_result_from_post_with_child_theme() { 135 135 switch_theme( 'block-theme-child' ); 136 136 … … 143 143 } 144 144 145 function test_build_block_template_result_from_file() {145 public function test_build_block_template_result_from_file() { 146 146 $template = _build_block_template_result_from_file( 147 147 array( … … 189 189 * @covers ::_build_block_template_result_from_file 190 190 */ 191 function test_build_block_template_result_from_file_with_child_theme() {191 public function test_build_block_template_result_from_file_with_child_theme() { 192 192 switch_theme( 'block-theme-child' ); 193 193 … … 204 204 } 205 205 206 function test_inject_theme_attribute_in_block_template_content() {206 public function test_inject_theme_attribute_in_block_template_content() { 207 207 $theme = get_stylesheet(); 208 208 $content_without_theme_attribute = '<!-- wp:template-part {"slug":"header","align":"full", "tagName":"header","className":"site-header"} /-->'; … … 250 250 * @dataProvider data_remove_theme_attribute_in_block_template_content 251 251 */ 252 function test_remove_theme_attribute_in_block_template_content( $template_content, $expected ) {252 public function test_remove_theme_attribute_in_block_template_content( $template_content, $expected ) { 253 253 $this->assertSame( $expected, _remove_theme_attribute_in_block_template_content( $template_content ) ); 254 254 } 255 255 256 function data_remove_theme_attribute_in_block_template_content() {256 public function data_remove_theme_attribute_in_block_template_content() { 257 257 return array( 258 258 array( … … 280 280 * Should retrieve the template from the theme files. 281 281 */ 282 function test_get_block_template_from_file() {282 public function test_get_block_template_from_file() { 283 283 $id = get_stylesheet() . '//' . 'index'; 284 284 $template = get_block_template( $id, 'wp_template' ); … … 330 330 * Should flatten nested blocks 331 331 */ 332 function test_flatten_blocks() {332 public function test_flatten_blocks() { 333 333 $content_template_part_inside_group = '<!-- wp:group --><!-- wp:template-part {"slug":"header"} /--><!-- /wp:group -->'; 334 334 $blocks = parse_blocks( $content_template_part_inside_group ); … … 356 356 * @requires extension zip 357 357 */ 358 function test_wp_generate_block_templates_export_file() {358 public function test_wp_generate_block_templates_export_file() { 359 359 $filename = wp_generate_block_templates_export_file(); 360 360 $this->assertFileExists( $filename, 'zip file is created at the specified path' );
Note: See TracChangeset
for help on using the changeset viewer.