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
Copy file name to clipboardExpand all lines: features/framework.feature
+10-3Lines changed: 10 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -327,19 +327,26 @@ Feature: Load WP-CLI
327
327
"""
328
328
329
329
Given "define( 'DOMAIN_CURRENT_SITE', 'example.org' );" replaced with " " in the wp-config.php file
330
+
# WP < 5.0 have bug which will not find a blog given an empty domain unless wp_blogs.domain empty which was (partly) addressed by https://core.trac.wordpress.org/ticket/42299
331
+
# So empty wp_blogs.domain to make behavior consistent across WP versions.
332
+
And I run `wp db query 'UPDATE wp_blogs SET domain = NULL'`
330
333
331
334
When I run `cat wp-config.php`
332
335
Then STDOUT should not contain:
333
336
"""
334
337
DOMAIN_CURRENT_SITE
335
338
"""
336
339
337
-
When I try `wp option get home`
338
-
Then STDERR should be:
340
+
# This will work as finds blog with empty domain and thus uses `home` option.
341
+
When I run `wp option get home`
342
+
Then STDOUT should be:
339
343
"""
340
-
Error: Site not found. Define DOMAIN_CURRENT_SITE in 'wp-config.php' or use `--url=<url>` to override.
344
+
http://example.com
341
345
"""
342
346
347
+
# Undo above.
348
+
Given I run `wp db query 'UPDATE wp_blogs SET domain = "example.com"'`
0 commit comments