You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix multinetwork test: use example.com domain and wp-config swap
Two bugs in the previous test:
1. Wrong domain: network 2 was created with domain=localhost but the
Behat test environment installs WordPress at https://example.com.
2. URL routing doesn't work: DOMAIN_CURRENT_SITE is a PHP constant
hardcoded in wp-config.php, so WordPress skips the DB lookup entirely
and get_current_network_id() always returns SITE_ID_CURRENT_SITE (1)
regardless of --url. The --url=localhost/net2-site1/ approach could
never route to network 2.
Fix: create network 2 with domain=example.com, move 2 blogs to it, then
swap SITE_ID_CURRENT_SITE from 1 to 2 in wp-config.php before the second
run. This correctly puts WordPress into network 2 context so the command
processes only the 2 network-2 sites.
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
0 commit comments