Changeset 52010 for trunk/tests/phpunit/tests/xmlrpc/wp/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/wp/editPost.php
r51968 r52010 6 6 class Tests_XMLRPC_wp_editPost extends WP_XMLRPC_UnitTestCase { 7 7 8 function test_invalid_username_password() {8 public function test_invalid_username_password() { 9 9 $result = $this->myxmlrpcserver->wp_editPost( array( 1, 'username', 'password', 0, array() ) ); 10 10 $this->assertIXRError( $result ); … … 12 12 } 13 13 14 function test_edit_own_post() {14 public function test_edit_own_post() { 15 15 $contributor_id = $this->make_user_by_role( 'contributor' ); 16 16 … … 31 31 } 32 32 33 function test_capable_edit_others_post() {33 public function test_capable_edit_others_post() { 34 34 $contributor_id = $this->make_user_by_role( 'contributor' ); 35 35 $this->make_user_by_role( 'editor' ); … … 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 … … 196 196 } 197 197 198 function test_edit_custom_fields() {198 public function test_edit_custom_fields() { 199 199 $contributor_id = $this->make_user_by_role( 'contributor' ); 200 200 … … 240 240 } 241 241 242 function test_capable_unsticky() {242 public function test_capable_unsticky() { 243 243 $editor_id = $this->make_user_by_role( 'editor' ); 244 244 … … 252 252 } 253 253 254 function test_password_transition_unsticky() {254 public function test_password_transition_unsticky() { 255 255 // When transitioning to private status or adding a post password, post should be un-stuck. 256 256 $editor_id = $this->make_user_by_role( 'editor' ); … … 267 267 } 268 268 269 function test_if_not_modified_since() {269 public function test_if_not_modified_since() { 270 270 $editor_id = $this->make_user_by_role( 'editor' ); 271 271 … … 306 306 } 307 307 308 function test_edit_attachment() {308 public function test_edit_attachment() { 309 309 $editor_id = $this->make_user_by_role( 'editor' ); 310 310 … … 327 327 } 328 328 329 function test_use_invalid_post_status() {329 public function test_use_invalid_post_status() { 330 330 $editor_id = $this->make_user_by_role( 'editor' ); 331 331 … … 349 349 * @ticket 22220 350 350 */ 351 function test_loss_of_categories_on_edit() {351 public function test_loss_of_categories_on_edit() { 352 352 $editor_id = $this->make_user_by_role( 'editor' ); 353 353 … … 380 380 * @ticket 26686 381 381 */ 382 function test_clear_categories_on_edit() {382 public function test_clear_categories_on_edit() { 383 383 $editor_id = $this->make_user_by_role( 'editor' ); 384 384 … … 407 407 * @ticket 23219 408 408 */ 409 function test_add_enclosure_if_new() {409 public function test_add_enclosure_if_new() { 410 410 // Sample enclosure data. 411 411 $enclosure = array( … … 468 468 * @ticket 35874 469 469 */ 470 function test_draft_not_prematurely_published() { 471 if ( PHP_VERSION_ID >= 80100 ) { 472 /* 473 * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in 474 * via hooked in filter functions until a more structural solution to the 475 * "missing input validation" conundrum has been architected and implemented. 476 */ 477 $this->expectDeprecation(); 478 $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); 479 } 480 470 public function test_draft_not_prematurely_published() { 481 471 $editor_id = $this->make_user_by_role( 'editor' ); 482 472 … … 514 504 * @ticket 45322 515 505 */ 516 function test_draft_not_assigned_published_date() { 517 if ( PHP_VERSION_ID >= 80100 ) { 518 /* 519 * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in 520 * via hooked in filter functions until a more structural solution to the 521 * "missing input validation" conundrum has been architected and implemented. 522 */ 523 $this->expectDeprecation(); 524 $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' ); 525 } 526 506 public function test_draft_not_assigned_published_date() { 527 507 $editor_id = $this->make_user_by_role( 'editor' ); 528 508
Note: See TracChangeset
for help on using the changeset viewer.