Changeset 51562 for trunk/tests/phpunit/includes/abstract-testcase.php
- Timestamp:
- 08/06/2021 09:17:20 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/abstract-testcase.php
r51561 r51562 565 565 566 566 /** 567 * PHPUnit 6+ compatibility shim. 567 * Redundant PHPUnit 6+ compatibility shim. DO NOT USE! 568 * 569 * This method is only left in place for backward compatibility reasons. 570 * 571 * @deprecated 5.9.0 Use the PHPUnit native expectException*() methods directly. 568 572 * 569 573 * @param mixed $exception … … 572 576 */ 573 577 public function setExpectedException( $exception, $message = '', $code = null ) { 574 if ( method_exists( 'PHPUnit_Framework_TestCase', 'setExpectedException' ) ) { 575 parent::setExpectedException( $exception, $message, $code ); 576 } else { 577 $this->expectException( $exception ); 578 if ( '' !== $message ) { 579 $this->expectExceptionMessage( $message ); 580 } 581 if ( null !== $code ) { 582 $this->expectExceptionCode( $code ); 583 } 578 $this->expectException( $exception ); 579 580 if ( '' !== $message ) { 581 $this->expectExceptionMessage( $message ); 582 } 583 584 if ( null !== $code ) { 585 $this->expectExceptionCode( $code ); 584 586 } 585 587 }
Note: See TracChangeset
for help on using the changeset viewer.