Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #52235, comment 1


Ignore:
Timestamp:
01/07/2021 08:46:42 AM (3 years ago)
Author:
seanleavey
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #52235, comment 1

    v1 v2  
    11~~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.~~
    22
    3 Actually this was a problem on my end.
     3Actually this was a problem on my end (the stuff immediately above, not the original issue).