Changeset 40872 for trunk/tests/phpunit/includes/testcase.php
- Timestamp:
- 06/02/2017 01:17:30 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/testcase.php
r40605 r40872 442 442 public function setExpectedIncorrectUsage( $doing_it_wrong ) { 443 443 array_push( $this->expected_doing_it_wrong, $doing_it_wrong ); 444 } 445 446 /** 447 * PHPUnit 6+ compatibility shim. 448 * 449 * @param mixed $exception 450 * @param string $message 451 * @param int|string $code 452 */ 453 public function setExpectedException( $exception, $message = '', $code = null ) { 454 if ( method_exists( 'PHPUnit_Framework_TestCase::setExpectedException' ) ) { 455 parent::setExpectedException( $exception, $message, $code ); 456 } else { 457 $this->expectException( $exception ); 458 if ( '' !== $message ) { 459 $this->expectExceptionMessage( $message ); 460 } 461 if ( null !== $code ) { 462 $this->expectExceptionCode( $code ); 463 } 464 } 444 465 } 445 466
Note: See TracChangeset
for help on using the changeset viewer.