Changeset 51968 for trunk/tests/phpunit/tests/comment-submission.php
- Timestamp:
- 11/01/2021 10:22:49 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment-submission.php
r51568 r51968 201 201 202 202 public function test_submitting_comment_to_password_protected_post_succeeds() { 203 if ( PHP_VERSION_ID >= 80100 ) { 204 /* 205 * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in 206 * via hooked in filter functions until a more structural solution to the 207 * "missing input validation" conundrum has been architected and implemented. 208 */ 209 $this->expectDeprecation(); 210 $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); 211 } 203 212 204 213 $password = 'password'; … … 283 292 */ 284 293 public function test_submitting_comment_handles_slashes_correctly_handles_slashes() { 294 if ( PHP_VERSION_ID >= 80100 ) { 295 /* 296 * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in 297 * via hooked in filter functions until a more structural solution to the 298 * "missing input validation" conundrum has been architected and implemented. 299 */ 300 $this->expectDeprecation(); 301 $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); 302 } 285 303 286 304 $data = array( … … 430 448 431 449 public function test_anonymous_user_cannot_comment_unfiltered_html() { 450 if ( PHP_VERSION_ID >= 80100 ) { 451 /* 452 * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in 453 * via hooked in filter functions until a more structural solution to the 454 * "missing input validation" conundrum has been architected and implemented. 455 */ 456 $this->expectDeprecation(); 457 $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); 458 } 432 459 433 460 $data = array( … … 720 747 */ 721 748 public function test_submitting_comment_with_empty_type_results_in_correct_type() { 749 if ( PHP_VERSION_ID >= 80100 ) { 750 /* 751 * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in 752 * via hooked in filter functions until a more structural solution to the 753 * "missing input validation" conundrum has been architected and implemented. 754 */ 755 $this->expectDeprecation(); 756 $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); 757 } 758 722 759 $data = array( 723 760 'comment_post_ID' => self::$post->ID, … … 803 840 */ 804 841 public function test_submitting_duplicate_comments() { 842 if ( PHP_VERSION_ID >= 80100 ) { 843 /* 844 * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in 845 * via hooked in filter functions until a more structural solution to the 846 * "missing input validation" conundrum has been architected and implemented. 847 */ 848 $this->expectDeprecation(); 849 $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); 850 } 851 805 852 $data = array( 806 853 'comment_post_ID' => self::$post->ID, … … 819 866 */ 820 867 public function test_comments_flood() { 868 if ( PHP_VERSION_ID >= 80100 ) { 869 /* 870 * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in 871 * via hooked in filter functions until a more structural solution to the 872 * "missing input validation" conundrum has been architected and implemented. 873 */ 874 $this->expectDeprecation(); 875 $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); 876 } 877 821 878 $data = array( 822 879 'comment_post_ID' => self::$post->ID,
Note: See TracChangeset
for help on using the changeset viewer.