Skip to content

Commit 2d94ec6

Browse files
committed
Add a rendered block to the output
1 parent 6308437 commit 2d94ec6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/phpunit/tests/template.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,11 +1060,16 @@ public function test_wp_hoist_late_printed_styles( ?Closure $set_up ): void {
10601060
wp_enqueue_style( 'late', 'https://example.com/late-style.css', array(), null );
10611061
wp_add_inline_style( 'late', '/* LATE */' );
10621062

1063+
$content = apply_filters(
1064+
'the_content',
1065+
'<!-- wp:separator --><hr class="wp-block-separator has-alpha-channel-opacity"/><!-- /wp:separator -->'
1066+
);
1067+
10631068
// Simulate footer scripts.
10641069
$footer_output = get_echo( 'wp_footer' );
10651070

10661071
// Create a simulated output buffer.
1067-
$buffer = '<html lang="en"><head><meta charset="utf-8">' . $head_output . '</head><body><main>Content</main>' . $footer_output . '</body></html>';
1072+
$buffer = '<html lang="en"><head><meta charset="utf-8">' . $head_output . '</head><body><main>' . $content . '</main>' . $footer_output . '</body></html>';
10681073

10691074
// Apply the output buffer filter.
10701075
$filtered_buffer = apply_filters( 'wp_template_enhancement_output_buffer', $buffer );

0 commit comments

Comments
 (0)