Changeset 52010 for trunk/tests/phpunit/tests/xmlrpc/mw/editPost.php
- Timestamp:
- 11/04/2021 03:22:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/mw/editPost.php
r51968 r52010 6 6 class Tests_XMLRPC_mw_editPost extends WP_XMLRPC_UnitTestCase { 7 7 8 function test_invalid_username_password() {8 public function test_invalid_username_password() { 9 9 $post = array(); 10 10 $result = $this->myxmlrpcserver->mw_editPost( array( 1, 'username', 'password', $post ) ); … … 13 13 } 14 14 15 function test_edit_own_post() {15 public function test_edit_own_post() { 16 16 $contributor_id = $this->make_user_by_role( 'contributor' ); 17 17 $post = array( … … 31 31 } 32 32 33 function test_capable_edit_others_post() {33 public function test_capable_edit_others_post() { 34 34 $this->make_user_by_role( 'editor' ); 35 35 $contributor_id = $this->make_user_by_role( 'contributor' ); … … 51 51 } 52 52 53 function test_incapable_edit_others_post() {53 public function test_incapable_edit_others_post() { 54 54 $this->make_user_by_role( 'contributor' ); 55 55 $author_id = $this->make_user_by_role( 'author' ); … … 72 72 } 73 73 74 function test_capable_reassign_author() {74 public function test_capable_reassign_author() { 75 75 $contributor_id = $this->make_user_by_role( 'contributor' ); 76 76 $author_id = $this->make_user_by_role( 'author' ); … … 92 92 } 93 93 94 function test_incapable_reassign_author() {94 public function test_incapable_reassign_author() { 95 95 $contributor_id = $this->make_user_by_role( 'contributor' ); 96 96 $author_id = $this->make_user_by_role( 'author' ); … … 114 114 * @ticket 24916 115 115 */ 116 function test_capable_reassign_author_to_self() {116 public function test_capable_reassign_author_to_self() { 117 117 $contributor_id = $this->make_user_by_role( 'contributor' ); 118 118 $editor_id = $this->make_user_by_role( 'editor' ); … … 136 136 * @requires function imagejpeg 137 137 */ 138 function test_post_thumbnail() {138 public function test_post_thumbnail() { 139 139 add_theme_support( 'post-thumbnails' ); 140 140 … … 183 183 } 184 184 185 function test_edit_basic_post_info() {185 public function test_edit_basic_post_info() { 186 186 $contributor_id = $this->make_user_by_role( 'contributor' ); 187 187 … … 234 234 * @ticket 20662 235 235 */ 236 function test_make_post_sticky() {236 public function test_make_post_sticky() { 237 237 $author_id = $this->make_user_by_role( 'editor' ); 238 238 … … 251 251 252 252 // Not allowed since [19914]. 253 function test_change_post_type() {253 public function test_change_post_type() { 254 254 $contributor_id = $this->make_user_by_role( 'contributor' ); 255 255 … … 269 269 * @ticket 16980 270 270 */ 271 function test_empty_not_null() {271 public function test_empty_not_null() { 272 272 $editor_id = $this->make_user_by_role( 'editor' ); 273 273 … … 301 301 * @ticket 35874 302 302 */ 303 function test_draft_not_prematurely_published() { 304 if ( PHP_VERSION_ID >= 80100 ) { 305 /* 306 * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in 307 * via hooked in filter functions until a more structural solution to the 308 * "missing input validation" conundrum has been architected and implemented. 309 */ 310 $this->expectDeprecation(); 311 $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); 312 } 313 303 public function test_draft_not_prematurely_published() { 314 304 $editor_id = $this->make_user_by_role( 'editor' ); 315 305
Note: See TracChangeset
for help on using the changeset viewer.