- Timestamp:
- 02/02/2021 07:43:37 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/privacy/wpCreateUserRequest.php
r49603 r50159 309 309 $this->assertSame( 'empty_content', $actual->get_error_code() ); 310 310 } 311 312 /** 313 * Test that the request has a Pending status if a confirmation email is sent. 314 * 315 * @ticket 43890 316 */ 317 public function test_pending_status_with_default_wp_create_user_request_params() { 318 $actual = wp_create_user_request( self::$non_registered_user_email, 'export_personal_data' ); 319 $post = get_post( $actual ); 320 321 $this->assertSame( 'request-pending', $post->post_status ); 322 } 323 324 /** 325 * Test that the request has a Pending status if the $send_confirmation_email param is true. 326 * 327 * @ticket 43890 328 */ 329 public function test_pending_status_with_true_send_confirmation_email() { 330 $request_data = array(); 331 $send_confirmation_email = true; 332 333 $actual = wp_create_user_request( self::$non_registered_user_email, 'export_personal_data', $request_data, $send_confirmation_email ); 334 $post = get_post( $actual ); 335 336 $this->assertSame( 'request-pending', $post->post_status ); 337 } 338 339 /** 340 * Test that the request has a Completed status if the $send_confirmation_email param is false. 341 * 342 * @ticket 43890 343 */ 344 public function test_pending_status_with_false_send_confirmation_email() { 345 $request_data = array(); 346 $send_confirmation_email = false; 347 348 $actual = wp_create_user_request( self::$non_registered_user_email, 'export_personal_data', $request_data, $send_confirmation_email ); 349 $post = get_post( $actual ); 350 351 $this->assertSame( 'request-completed', $post->post_status ); 352 } 311 353 }
Note: See TracChangeset
for help on using the changeset viewer.