Make WordPress Core


Ignore:
Timestamp:
04/16/2015 11:59:01 PM (9 years ago)
Author:
boonebgorges
Message:

During PHPUnit tests, don't autodetect permalink structure during WP installation.

The unit tests expect non-pretty permalinks, so there's no benefit to detecting
the ability to have pretty permalinks. Moreover, the wp_remote_get() call can
cause installation to hang when there are DNS issues.

Fixes #31994.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/functions.php

    r28797 r32139  
    104104    }
    105105}
     106
     107/**
     108 * Set a permalink structure.
     109 *
     110 * Hooked as a callback to the 'populate_options' action, we use this function to set a permalink structure during
     111 * `wp_install()`, so that WP doesn't attempt to do a time-consuming remote request.
     112 *
     113 * @since 4.2.0
     114 */
     115function _set_default_permalink_structure_for_tests() {
     116    update_option( 'permalink_structure', '/%year%/%monthnum%/%day%/%postname%/' );
     117}
Note: See TracChangeset for help on using the changeset viewer.