Skip to content

Add unit tests for update_home_siteurl() in wp-admin/includes/misc.php#11754

Open
pbearne wants to merge 1 commit intoWordPress:trunkfrom
pbearne:65194-misc-update_home_siteurl
Open

Add unit tests for update_home_siteurl() in wp-admin/includes/misc.php#11754
pbearne wants to merge 1 commit intoWordPress:trunkfrom
pbearne:65194-misc-update_home_siteurl

Conversation

@pbearne
Copy link
Copy Markdown

@pbearne pbearne commented May 7, 2026

Description:
This PR adds unit tests for the update_home_siteurl() function in wp-admin/includes/misc.php. These tests ensure that WordPress rewrite rules are correctly flushed (or the option is deleted in switched multisite contexts) whenever the site URL or home URL options are updated, while correctly respecting the installation state.

The tests cover:

  • Verification that rewrite rules are NOT flushed when wp_installing() is true.
  • Verification that flush_rewrite_rules() is called on single site installations.
  • Verification that flush_rewrite_rules() is called on multisite when not in a switched state.
  • Verification that the rewrite_rules option is explicitly deleted when in a switched state on multisite.

Trac ticket: https://core.trac.wordpress.org/ticket/65194

AI Disclosure:

  • AI assistance: Yes
  • Tool(s): Junie (JetBrains)
  • Model(s): gemini-3-flash-preview
  • Used for: Code analysis, test implementation, and workflow management.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @pbearne@git.wordpress.org.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant