diff --git a/composer.json b/composer.json index 1b38710a..ab2b7014 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "wp-cli/db-command": "^1.3 || ^2 || ^3", "wp-cli/entity-command": "^1.3 || ^2 || ^3", "wp-cli/extension-command": "^1.2 || ^2 || ^3", - "wp-cli/wp-cli-tests": "^5" + "wp-cli/wp-cli-tests": "dev-create-sites-step as 5.3.99" }, "config": { "process-timeout": 7200, diff --git a/features/core-check-update-db.feature b/features/core-check-update-db.feature index 918cdefd..a899bb24 100644 --- a/features/core-check-update-db.feature +++ b/features/core-check-update-db.feature @@ -63,14 +63,13 @@ Feature: Check if WordPress database update is needed And I run `wp core download --version=6.6 --force` And I run `wp option update db_version 57155 --require=disable_sidebar_check.php` And I run `wp site option update wpmu_upgrade_site 57155` - And I run `wp site create --slug=foo` - And I run `wp site create --slug=bar` - And I run `wp site create --slug=burrito --porcelain` - And save STDOUT as {BURRITO_ID} - And I run `wp site create --slug=taco --porcelain` - And save STDOUT as {TACO_ID} - And I run `wp site create --slug=pizza --porcelain` - And save STDOUT as {PIZZA_ID} + And these sites: + | slug | save | + | foo | | + | bar | | + | burrito | BURRITO_ID | + | taco | TACO_ID | + | pizza | PIZZA_ID | And I run `wp site archive {BURRITO_ID}` And I run `wp site spam {TACO_ID}` And I run `wp site delete {PIZZA_ID} --yes` diff --git a/features/core-update-db.feature b/features/core-update-db.feature index 9df19053..91c97158 100644 --- a/features/core-update-db.feature +++ b/features/core-update-db.feature @@ -79,14 +79,13 @@ Feature: Update core's database And I run `wp core download --version=5.4 --force` And I run `wp option update db_version 45805 --require=disable_sidebar_check.php` And I run `wp site option update wpmu_upgrade_site 45805` - And I run `wp site create --slug=foo` - And I run `wp site create --slug=bar` - And I run `wp site create --slug=burrito --porcelain` - And save STDOUT as {BURRITO_ID} - And I run `wp site create --slug=taco --porcelain` - And save STDOUT as {TACO_ID} - And I run `wp site create --slug=pizza --porcelain` - And save STDOUT as {PIZZA_ID} + And these sites: + | slug | save | + | foo | | + | bar | | + | burrito | BURRITO_ID | + | taco | TACO_ID | + | pizza | PIZZA_ID | And I run `wp site archive {BURRITO_ID}` And I run `wp site spam {TACO_ID}` And I run `wp site delete {PIZZA_ID} --yes` @@ -124,14 +123,13 @@ Feature: Update core's database And I run `wp core download --version=5.4 --force` And I run `wp option update db_version 45805 --require=disable_sidebar_check.php` And I run `wp site option update wpmu_upgrade_site 45805` - And I run `wp site create --slug=foo` - And I run `wp site create --slug=bar` - And I run `wp site create --slug=burrito --porcelain` - And save STDOUT as {BURRITO_ID} - And I run `wp site create --slug=taco --porcelain` - And save STDOUT as {TACO_ID} - And I run `wp site create --slug=pizza --porcelain` - And save STDOUT as {PIZZA_ID} + And these sites: + | slug | save | + | foo | | + | bar | | + | burrito | BURRITO_ID | + | taco | TACO_ID | + | pizza | PIZZA_ID | And I run `wp site archive {BURRITO_ID}` And I run `wp site spam {TACO_ID}` And I run `wp site delete {PIZZA_ID} --yes` @@ -182,13 +180,15 @@ Feature: Update core's database And I run `wp option update db_version 45805 --require=disable_sidebar_check.php` And I run `wp site option update wpmu_upgrade_site 45805` # Create 2 additional sites in network 1 (main site already exists; 3 total in network 1) - And I run `wp site create --slug=net1-site1` - And I run `wp site create --slug=net1-site2` + And these sites: + | slug | + | net1-site1 | + | net1-site2 | # Create 2 sites that will be moved to a second network (5 sites total) - And I run `wp site create --slug=net2-site1 --porcelain` - And save STDOUT as {NET2_SITE1_ID} - And I run `wp site create --slug=net2-site2 --porcelain` - And save STDOUT as {NET2_SITE2_ID} + And these sites: + | slug | save | + | net2-site1 | NET2_SITE1_ID | + | net2-site2 | 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} ] );'`