Changeset 45160 for trunk/tests/phpunit/includes/functions.php
- Timestamp:
- 04/11/2019 05:29:20 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/functions.php
r44812 r45160 3 3 /** 4 4 * Retrieves PHPUnit runner version. 5 * 6 * @return double The version number. 5 7 */ 6 8 function tests_get_phpunit_version() { … … 135 137 } 136 138 139 /** 140 * Handles the WP die handler by outputting the given values as text. 141 * 142 * @param string $message The message. 143 * @param string $title The title. 144 * @param array $args Array with arguments. 145 */ 137 146 function _wp_die_handler( $message, $title = '', $args = array() ) { 138 147 if ( ! $GLOBALS['_wp_die_disabled'] ) { … … 143 152 } 144 153 154 /** 155 * Disables the WP die handler. 156 */ 145 157 function _disable_wp_die() { 146 158 $GLOBALS['_wp_die_disabled'] = true; 147 159 } 148 160 161 /** 162 * Enables the WP die handler. 163 */ 149 164 function _enable_wp_die() { 150 165 $GLOBALS['_wp_die_disabled'] = false; 151 166 } 152 167 168 /** 169 * Returns the die handler. 170 * 171 * @return string The die handler. 172 */ 153 173 function _wp_die_handler_filter() { 154 174 return '_wp_die_handler'; 155 175 } 156 176 177 /** 178 * Returns the die handler. 179 * 180 * @return string The die handler. 181 */ 157 182 function _wp_die_handler_filter_exit() { 158 183 return '_wp_die_handler_exit'; 159 184 } 160 185 186 /** 187 * Dies without an exit. 188 * 189 * @param string $message The message. 190 * @param string $title The title. 191 * @param array $args Array with arguments. 192 */ 161 193 function _wp_die_handler_txt( $message, $title, $args ) { 162 194 echo "\nwp_die called\n"; … … 171 203 } 172 204 205 /** 206 * Dies with an exit. 207 * 208 * @param string $message The message. 209 * @param string $title The title. 210 * @param array $args Array with arguments. 211 */ 173 212 function _wp_die_handler_exit( $message, $title, $args ) { 174 213 echo "\nwp_die called\n"; … … 198 237 /** 199 238 * Helper used with the `upload_dir` filter to remove the /year/month sub directories from the uploads path and URL. 239 * 240 * @return array The altered array. 200 241 */ 201 242 function _upload_dir_no_subdir( $uploads ) { … … 211 252 /** 212 253 * Helper used with the `upload_dir` filter to set https upload URL. 254 * 255 * @return array The altered array. 213 256 */ 214 257 function _upload_dir_https( $uploads ) { … … 221 264 /** 222 265 * Use the Spy_REST_Server class for the REST server. 266 * 267 * @return string The server class name. 223 268 */ 224 269 function _wp_rest_server_class_filter() {
Note: See TracChangeset
for help on using the changeset viewer.