Changeset 53638 for trunk/tests/phpunit/includes/abstract-testcase.php
- Timestamp:
- 07/03/2022 05:28:12 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/abstract-testcase.php
r53637 r53638 488 488 /** 489 489 * Sets up the expectations for testing a deprecated call. 490 * 491 * @since 3.7.0 490 492 */ 491 493 public function expectDeprecated() { … … 534 536 * 535 537 * The DocBlock should contain `@expectedDeprecated` to trigger this. 538 * 539 * @since 3.7.0 540 * @since 6.1.0 Includes the actual unexpected `_doing_it_wrong()` message 541 * or deprecation notice in the output if one is encountered. 536 542 */ 537 543 public function expectedDeprecated() { … … 544 550 545 551 foreach ( $not_caught_deprecated as $not_caught ) { 546 $errors[] = "Failed to assert that $not_caught triggered a deprecation notice ";552 $errors[] = "Failed to assert that $not_caught triggered a deprecation notice."; 547 553 } 548 554 … … 553 559 554 560 foreach ( $unexpected_deprecated as $unexpected ) { 555 $errors[] = "Unexpected deprecation notice for $unexpected ";561 $errors[] = "Unexpected deprecation notice for $unexpected."; 556 562 $errors[] = $this->caught_deprecated[ $unexpected ]; 557 563 } … … 563 569 564 570 foreach ( $not_caught_doing_it_wrong as $not_caught ) { 565 $errors[] = "Failed to assert that $not_caught triggered an incorrect usage notice ";571 $errors[] = "Failed to assert that $not_caught triggered an incorrect usage notice."; 566 572 } 567 573 … … 572 578 573 579 foreach ( $unexpected_doing_it_wrong as $unexpected ) { 574 $errors[] = "Unexpected incorrect usage notice for $unexpected ";580 $errors[] = "Unexpected incorrect usage notice for $unexpected."; 575 581 $errors[] = $this->caught_doing_it_wrong[ $unexpected ]; 576 582 } … … 601 607 * @since 4.2.0 602 608 * 603 * @param string $deprecated Name of the function, method, class, or argument that is deprecated. Must match 604 * the first parameter of the `_deprecated_function()` or `_deprecated_argument()` call. 609 * @param string $deprecated Name of the function, method, class, or argument that is deprecated. 610 * Must match the first parameter of the `_deprecated_function()` 611 * or `_deprecated_argument()` call. 605 612 */ 606 613 public function setExpectedDeprecated( $deprecated ) { … … 613 620 * @since 4.2.0 614 621 * 615 * @param string $doing_it_wrong Name of the function, method, or class that appears in the first argument616 * of the source `_doing_it_wrong()` call.622 * @param string $doing_it_wrong Name of the function, method, or class that appears in 623 * the first argument of the source `_doing_it_wrong()` call. 617 624 */ 618 625 public function setExpectedIncorrectUsage( $doing_it_wrong ) { … … 625 632 * This method is only left in place for backward compatibility reasons. 626 633 * 634 * @since 4.8.0 627 635 * @deprecated 5.9.0 Use the PHPUnit native expectException*() methods directly. 628 636 * … … 645 653 /** 646 654 * Adds a deprecated function to the list of caught deprecated calls. 655 * 656 * @since 3.7.0 657 * @since 6.1.0 Added the `$replacement`, `$version`, and `$message` parameters. 647 658 * 648 659 * @param string $function The deprecated function. … … 729 740 /** 730 741 * Adds a function called in a wrong way to the list of `_doing_it_wrong()` calls. 742 * 743 * @since 3.7.0 744 * @since 6.1.0 Added the `$message` and `$version` parameters. 731 745 * 732 746 * @param string $function The function to add.
Note: See TracChangeset
for help on using the changeset viewer.