Changeset 32139
- Timestamp:
- 04/16/2015 11:59:01 PM (10 years ago)
- Location:
- trunk/tests/phpunit/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/functions.php
r28797 r32139 104 104 } 105 105 } 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 */ 115 function _set_default_permalink_structure_for_tests() { 116 update_option( 'permalink_structure', '/%year%/%monthnum%/%day%/%postname%/' ); 117 } -
trunk/tests/phpunit/includes/install.php
r30267 r32139 45 45 } 46 46 47 // Prefill a permalink structure so that WP doesn't try to determine one itself. 48 add_action( 'populate_options', '_set_default_permalink_structure_for_tests' ); 49 47 50 wp_install( WP_TESTS_TITLE, 'admin', WP_TESTS_EMAIL, true, null, 'password' ); 51 52 // Delete dummy permalink structure, as prefilled above. 53 if ( ! is_multisite() ) { 54 delete_option( 'permalink_structure' ); 55 } 56 remove_action( 'populate_options', '_set_default_permalink_structure_for_tests' ); 48 57 49 58 if ( $multisite ) {
Note: See TracChangeset
for help on using the changeset viewer.