From da25f0d9cbf2ae65c3dd9290de5311d6211ab034 Mon Sep 17 00:00:00 2001 From: "Engineer (geomonitor)" Date: Sun, 14 Jun 2026 13:02:41 +0000 Subject: [PATCH] Fix CI (round 3): stub esc_attr__() in bootstrap PRV_Dashboard_Renderer::render_trendline() uses esc_attr__() (the WP function combining esc_attr + translation) for the canvas aria-label. The stub was missing; PHP fatal on line 112 when test-dashboard-panel.php called render_trendline() directly. --- tests/bootstrap.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 9d46c6a..8adba5f 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -151,6 +151,7 @@ function __( string $text, string $domain = 'default' ): string { return $text; function _n( string $single, string $plural, int $number, string $domain = 'default' ): string { return 1 === $number ? $single : $plural; } function esc_html( string $text ): string { return htmlspecialchars( $text, ENT_QUOTES ); } function esc_html__( string $text, string $domain = 'default' ): string { return esc_html( $text ); } +function esc_attr__( string $text, string $domain = 'default' ): string { return esc_attr( $text ); } function esc_attr( string $text ): string { return htmlspecialchars( $text, ENT_QUOTES ); } function esc_textarea( string $text ): string { return htmlspecialchars( $text, ENT_QUOTES ); } function esc_js( string $text ): string { return addslashes( $text ); }