Changeset 45139 for trunk/tests/phpunit/tests/blocks/render.php
- Timestamp:
- 04/08/2019 06:53:14 AM (7 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/blocks/render.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/blocks/render.php
r44785 r45139 85 85 86 86 function handle_shortcode( $atts, $content ) { 87 return $content; 88 } 89 90 /** 91 * @ticket 45495 92 */ 93 function test_nested_calls_to_the_content() { 94 register_block_type( 95 'core/test', 96 array( 97 'render_callback' => array( 98 $this, 99 'dynamic_the_content_call', 100 ), 101 ) 102 ); 103 104 $content = "foo\n\nbar"; 105 106 $the_content = apply_filters( 'the_content', '<!-- wp:core/test -->' . $content . '<!-- /wp:core/test -->' ); 107 108 $this->assertSame( $content, $the_content ); 109 } 110 111 function dynamic_the_content_call( $attrs, $content ) { 112 apply_filters( 'the_content', '' ); 87 113 return $content; 88 114 }
Note: See TracChangeset
for help on using the changeset viewer.