Changeset 51968 for trunk/tests/phpunit/tests/admin/includesPost.php
- Timestamp:
- 11/01/2021 10:22:49 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/admin/includesPost.php
r51639 r51968 877 877 */ 878 878 public function test_post_exists_should_support_post_type() { 879 if ( PHP_VERSION_ID >= 80100 ) { 880 /* 881 * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in 882 * via hooked in filter functions until a more structural solution to the 883 * "missing input validation" conundrum has been architected and implemented. 884 */ 885 $this->expectDeprecation(); 886 $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); 887 } 888 879 889 $title = 'Foo Bar'; 880 890 $post_type = 'page'; … … 894 904 */ 895 905 public function test_post_exists_should_not_match_a_page_for_post() { 906 if ( PHP_VERSION_ID >= 80100 ) { 907 /* 908 * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in 909 * via hooked in filter functions until a more structural solution to the 910 * "missing input validation" conundrum has been architected and implemented. 911 */ 912 $this->expectDeprecation(); 913 $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); 914 } 915 896 916 $title = 'Foo Bar'; 897 917 $post_type = 'page'; … … 911 931 */ 912 932 public function test_post_exists_should_support_post_status() { 933 if ( PHP_VERSION_ID >= 80100 ) { 934 /* 935 * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in 936 * via hooked in filter functions until a more structural solution to the 937 * "missing input validation" conundrum has been architected and implemented. 938 */ 939 $this->expectDeprecation(); 940 $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); 941 } 942 913 943 $title = 'Foo Bar'; 914 944 $post_type = 'post'; … … 931 961 */ 932 962 public function test_post_exists_should_support_post_type_status_combined() { 963 if ( PHP_VERSION_ID >= 80100 ) { 964 /* 965 * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in 966 * via hooked in filter functions until a more structural solution to the 967 * "missing input validation" conundrum has been architected and implemented. 968 */ 969 $this->expectDeprecation(); 970 $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); 971 } 972 933 973 $title = 'Foo Bar'; 934 974 $post_type = 'post'; … … 950 990 */ 951 991 public function test_post_exists_should_only_match_correct_post_status() { 992 if ( PHP_VERSION_ID >= 80100 ) { 993 /* 994 * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in 995 * via hooked in filter functions until a more structural solution to the 996 * "missing input validation" conundrum has been architected and implemented. 997 */ 998 $this->expectDeprecation(); 999 $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); 1000 } 1001 952 1002 $title = 'Foo Bar'; 953 1003 $post_type = 'post'; … … 969 1019 */ 970 1020 public function test_post_exists_should_not_match_invalid_post_type_and_status_combined() { 1021 if ( PHP_VERSION_ID >= 80100 ) { 1022 /* 1023 * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in 1024 * via hooked in filter functions until a more structural solution to the 1025 * "missing input validation" conundrum has been architected and implemented. 1026 */ 1027 $this->expectDeprecation(); 1028 $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); 1029 } 1030 971 1031 $title = 'Foo Bar'; 972 1032 $post_type = 'post';
Note: See TracChangeset
for help on using the changeset viewer.