From c974a1592fcc861071aa9faf7fc8c01fbe8092fe Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 1 Sep 2026 12:34:48 +0200 Subject: [PATCH] Fix PHPCS errors in Behat test files --- features/cache.feature | 19 +++++++++++++------ features/handler.feature | 7 ++++++- features/provider.feature | 11 +++++++---- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/features/cache.feature b/features/cache.feature index 8d72e9e..4169f05 100644 --- a/features/cache.feature +++ b/features/cache.feature @@ -79,7 +79,7 @@ Feature: Manage oEmbed cache. # Add a non-post embed, default attributes. Given a step1.php file: """ - run_shortcode( "[embed]https://www.youtube.com/watch?v=dQw4w9WgXcQ[/embed]" ); + run_shortcode( '[embed]https://www.youtube.com/watch?v=dQw4w9WgXcQ[/embed]' ); """ When I run `wp eval-file step1.php` Then STDOUT should contain: @@ -93,7 +93,7 @@ Feature: Manage oEmbed cache. # Add a non-post embed with width attribute. Given a step2.php file: """ - run_shortcode( "[embed width=400]https://www.youtube.com/watch?v=yPYZpwSpKmA[/embed]" ); + run_shortcode( '[embed width=400]https://www.youtube.com/watch?v=yPYZpwSpKmA[/embed]' ); """ When I run `wp eval-file step2.php` Then STDOUT should contain: @@ -124,7 +124,7 @@ Feature: Manage oEmbed cache. # Add a non-post embed with discover=1 attribute. Given a step3.php file: """ - run_shortcode( "[embed discover=1]https://www.youtube.com/watch?v=yBwD4iYcWC4[/embed]" ); + run_shortcode( '[embed discover=1]https://www.youtube.com/watch?v=yBwD4iYcWC4[/embed]' ); """ When I run `wp eval-file step3.php` Then STDOUT should contain: @@ -151,7 +151,7 @@ Feature: Manage oEmbed cache. # Add a non-post embed with width and discover attributes. Given a step4.php file: """ - run_shortcode( "[embed width=450 discover=0]https://www.youtube.com/watch?v=eYuUAGXN0KM[/embed]" ); + run_shortcode( '[embed width=450 discover=0]https://www.youtube.com/watch?v=eYuUAGXN0KM[/embed]' ); """ When I run `wp eval-file step4.php` Then STDOUT should contain: @@ -196,7 +196,7 @@ Feature: Manage oEmbed cache. # Dummy data with default width/height. Given a step5.php file: """ - "600", "height" => "400" ) ) ); + '600', + 'height' => '400', + ) + ) + ); """ When I run `wp eval-file step6.php` Then STDOUT should not be empty diff --git a/features/handler.feature b/features/handler.feature index c3fa068..87d5173 100644 --- a/features/handler.feature +++ b/features/handler.feature @@ -57,7 +57,12 @@ Feature: Manage embed handlers. Given an embed_register_handler.php file: """ -