From 08085c65e3816035ffb743df3120490a414e7156 Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Mon, 2 Nov 2026 04:07:28 +0100 Subject: [PATCH] Run setup commands in a single process in tests Co-Authored-By: Claude Opus 5.5 --- features/core-update-db.feature | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/features/core-update-db.feature b/features/core-update-db.feature index 3ec5ee17..744dba4e 100644 --- a/features/core-update-db.feature +++ b/features/core-update-db.feature @@ -205,8 +205,10 @@ Feature: Update core's database And I run `wp site create --slug=net2-site2 --porcelain` And save STDOUT as {NET2_SITE2_ID} # Register a second network (ID=2) and reassign those two blogs to it - And I run `wp eval 'global $wpdb; $wpdb->insert( $wpdb->site, [ "domain" => "example.com", "path" => "/network2/" ] );'` - And I run `wp eval 'global $wpdb; $wpdb->update( $wpdb->blogs, [ "site_id" => 2 ], [ "blog_id" => {NET2_SITE1_ID} ] ); $wpdb->update( $wpdb->blogs, [ "site_id" => 2 ], [ "blog_id" => {NET2_SITE2_ID} ] );'` + And these setup commands: + | command | + | wp eval 'global $wpdb; $wpdb->insert( $wpdb->site, [ "domain" => "example.com", "path" => "/network2/" ] );' | + | wp eval 'global $wpdb; $wpdb->update( $wpdb->blogs, [ "site_id" => 2 ], [ "blog_id" => {NET2_SITE1_ID} ] ); $wpdb->update( $wpdb->blogs, [ "site_id" => 2 ], [ "blog_id" => {NET2_SITE2_ID} ] );' | When I run `wp site option get wpmu_upgrade_site` Then save STDOUT as {UPDATE_VERSION}