1 | 1 | ~~This may also be related, but it seems that WordPress's testing bootstrap doesn't set the `home_url()` to the contents of the constant `WP_TESTS_DOMAIN`, so new posts created by e.g. `$this->factory->post->create()` inside unit tests have their permalink set to `localhost` (or presumably whatever the default is for the platform). This means that creating a post in a test with `post_content` set to contain a link to another post (retrieved via `get_permalink( $other_post )`), then running `wp_extract_urls` on its content, results in an array that doesn't contain the other post's URL.~~ |