From 92207a82af2cb27d82268f6c053ebc61e8e76a2f Mon Sep 17 00:00:00 2001 From: ramon Date: Fri, 23 Jun 2023 15:49:15 +1000 Subject: [PATCH] reformatting functions in test --- ...est-global-styles-revisions-controller.php | 108 +++++++++--------- 1 file changed, 57 insertions(+), 51 deletions(-) diff --git a/tests/phpunit/tests/rest-api/rest-global-styles-revisions-controller.php b/tests/phpunit/tests/rest-api/rest-global-styles-revisions-controller.php index cf78a9a9e0433..cd2e99f24059c 100644 --- a/tests/phpunit/tests/rest-api/rest-global-styles-revisions-controller.php +++ b/tests/phpunit/tests/rest-api/rest-global-styles-revisions-controller.php @@ -107,84 +107,90 @@ public static function wpSetupBeforeClass( $factory ) { // Update post to create a new revisions. $new_styles_post = array( 'ID' => self::$global_styles_id, - 'post_content' => wp_json_encode( array( - 'version' => WP_Theme_JSON::LATEST_SCHEMA, - 'isGlobalStylesUserThemeJSON' => true, - 'styles' => array( - 'color' => array( - 'background' => 'hotpink', + 'post_content' => wp_json_encode( + array( + 'version' => WP_Theme_JSON::LATEST_SCHEMA, + 'isGlobalStylesUserThemeJSON' => true, + 'styles' => array( + 'color' => array( + 'background' => 'hotpink', + ), ), - ), - 'settings' => array( - 'color' => array( - 'palette' => array( - 'custom' => array( - array( - 'name' => 'Ghost', - 'slug' => 'ghost', - 'color' => 'ghost', + 'settings' => array( + 'color' => array( + 'palette' => array( + 'custom' => array( + array( + 'name' => 'Ghost', + 'slug' => 'ghost', + 'color' => 'ghost', + ), ), ), ), ), - ), - ) ), + ) + ), ); wp_update_post( $new_styles_post, true, false ); $new_styles_post = array( 'ID' => self::$global_styles_id, - 'post_content' => wp_json_encode( array( - 'version' => WP_Theme_JSON::LATEST_SCHEMA, - 'isGlobalStylesUserThemeJSON' => true, - 'styles' => array( - 'color' => array( - 'background' => 'lemonchiffon', + 'post_content' => wp_json_encode( + array( + 'version' => WP_Theme_JSON::LATEST_SCHEMA, + 'isGlobalStylesUserThemeJSON' => true, + 'styles' => array( + 'color' => array( + 'background' => 'lemonchiffon', + ), ), - ), - 'settings' => array( - 'color' => array( - 'palette' => array( - 'custom' => array( - array( - 'name' => 'Gwanda', - 'slug' => 'gwanda', - 'color' => 'gwanda', + 'settings' => array( + 'color' => array( + 'palette' => array( + 'custom' => array( + array( + 'name' => 'Gwanda', + 'slug' => 'gwanda', + 'color' => 'gwanda', + ), ), ), ), ), - ), - ) ), + ) + ), ); wp_update_post( $new_styles_post, true, false ); $new_styles_post = array( 'ID' => self::$global_styles_id, - 'post_content' => wp_json_encode( array( - 'version' => WP_Theme_JSON::LATEST_SCHEMA, - 'isGlobalStylesUserThemeJSON' => true, - 'styles' => array( - 'color' => array( - 'background' => 'chocolate', + 'post_content' => wp_json_encode( + array( + 'version' => WP_Theme_JSON::LATEST_SCHEMA, + 'isGlobalStylesUserThemeJSON' => true, + 'styles' => array( + 'color' => array( + 'background' => 'chocolate', + ), ), - ), - 'settings' => array( - 'color' => array( - 'palette' => array( - 'custom' => array( - array( - 'name' => 'Stacy', - 'slug' => 'stacy', - 'color' => 'stacy', + 'settings' => array( + 'color' => array( + 'palette' => array( + 'custom' => array( + array( + 'name' => 'Stacy', + 'slug' => 'stacy', + 'color' => 'stacy', + ), ), ), ), ), - ), - ) ), + ) + ), ); wp_update_post( $new_styles_post, true, false );