Skip to content

Commit

Permalink
Fix deprecation warning in tests due to the_block_template_skip_link
Browse files Browse the repository at this point in the history
  • Loading branch information
thelovekesh committed Oct 16, 2023
1 parent f077562 commit 1563115
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/php/src/PluginSuppressionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,10 @@ private function assert_plugin_suppressed_state( $suppressed, $plugin_slugs ) {
$this->assertStringContainsString( 'Bad filter!', $content );
}

// Avoid running deprecated `the_block_template_skip_link()` while printing styles.
// @see <https://core.trac.wordpress.org/ticket/59505>.
remove_action( 'wp_footer', 'the_block_template_skip_link' );

// Check action.
ob_start();
wp_footer();
Expand Down

0 comments on commit 1563115

Please sign in to comment.