Changeset 53536 for trunk/tests/phpunit/includes/abstract-testcase.php
- Timestamp:
- 06/20/2022 05:27:15 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/abstract-testcase.php
r53521 r53536 655 655 */ 656 656 public function assertNotWPError( $actual, $message = '' ) { 657 if ( '' === $message && is_wp_error( $actual ) ) { 658 $message = $actual->get_error_message(); 659 } 657 if ( is_wp_error( $actual ) ) { 658 $message .= ' ' . $actual->get_error_message(); 659 } 660 660 661 $this->assertNotInstanceOf( 'WP_Error', $actual, $message ); 661 662 } … … 678 679 */ 679 680 public function assertNotIXRError( $actual, $message = '' ) { 680 if ( '' === $message && $actual instanceof IXR_Error ) { 681 $message = $actual->message; 682 } 681 if ( $actual instanceof IXR_Error ) { 682 $message .= ' ' . $actual->message; 683 } 684 683 685 $this->assertNotInstanceOf( 'IXR_Error', $actual, $message ); 684 686 }
Note: See TracChangeset
for help on using the changeset viewer.