diff --git a/tests/php/test-class-amp-theme-support.php b/tests/php/test-class-amp-theme-support.php index 63db5d03571..b150436a8d0 100644 --- a/tests/php/test-class-amp-theme-support.php +++ b/tests/php/test-class-amp-theme-support.php @@ -1049,6 +1049,8 @@ function() { $this->assertFalse( has_action( 'wp_head', $callback ) ); } + // Avoid running deprecated `print_emoji_styles()` while printing styles. + // @see . remove_action( 'wp_print_styles', 'print_emoji_styles' ); ob_start(); @@ -1194,6 +1196,9 @@ public function test_filter_admin_bar_style_loader_tag( $setup_callback, $assert add_filter( 'amp_dev_mode_enabled', '__return_true' ); add_filter( 'style_loader_tag', [ AMP_Theme_Support::class, 'filter_admin_bar_style_loader_tag' ], 10, 2 ); $setup_callback(); + + // Avoid running deprecated `print_emoji_styles()` while printing styles. + // @see . remove_action( 'wp_print_styles', 'print_emoji_styles' ); ob_start(); echo ''; @@ -1316,6 +1321,8 @@ public function test_init_admin_bar_for_directly_enqueued_dashicons() { // Enqueued directly. wp_enqueue_style( 'dashicons' ); + // Avoid running deprecated `print_emoji_styles()` while printing styles. + // @see . remove_action( 'wp_print_styles', 'print_emoji_styles' ); ob_start(); @@ -1344,6 +1351,8 @@ public function test_init_admin_bar_for_indirectly_enqueued_dashicons() { // Enqueued indirectly. wp_enqueue_style( 'my-font-pack', 'https://example.com/fonts', [ 'dashicons' ], '0.1' ); + // Avoid running deprecated `print_emoji_styles()` while printing styles. + // @see . remove_action( 'wp_print_styles', 'print_emoji_styles' ); ob_start();