Changeset 51608
- Timestamp:
- 08/13/2021 02:00:05 PM (3 years ago)
- Location:
- trunk/tests/phpunit
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/abstract-testcase.php
r51605 r51608 453 453 * Throws an exception when called. 454 454 * 455 * @throws WPDieException Exception containing the message. 456 * 457 * @param string $message The `wp_die()` message. 458 */ 459 public function wp_die_handler( $message ) { 455 * @since UT (3.7.0) 456 * @since 5.9.0 Added the `$title` and `$args` parameters. 457 * 458 * @throws WPDieException Exception containing the message and the response code. 459 * 460 * @param string|WP_Error $message The `wp_die()` message or WP_Error object. 461 * @param string $title The `wp_die()` title. 462 * @param string|array $args The `wp_die()` arguments. 463 */ 464 public function wp_die_handler( $message, $title, $args ) { 460 465 if ( is_wp_error( $message ) ) { 461 466 $message = $message->get_error_message(); … … 466 471 } 467 472 468 throw new WPDieException( $message ); 473 $code = 0; 474 if ( isset( $args['response'] ) ) { 475 $code = $args['response']; 476 } 477 478 throw new WPDieException( $message, $code ); 469 479 } 470 480
Note: See TracChangeset
for help on using the changeset viewer.