File tree Expand file tree Collapse file tree
tests/phpunit/tests/rest-api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1388,7 +1388,7 @@ public function test_create_user_sends_admin_notification() {
13881388 $ response = rest_get_server ()->dispatch ( $ request );
13891389
13901390 $ this ->assertSame ( 201 , $ response ->get_status () );
1391-
1391+
13921392 $ mailer = tests_retrieve_phpmailer_instance ();
13931393 $ this ->assertNotEmpty ( $ mailer ->mock_sent , 'No emails were sent ' );
13941394 $ this ->assertSame ( get_option ( 'admin_email ' ), $ mailer ->mock_sent [0 ]['to ' ][0 ][0 ] );
@@ -1399,14 +1399,17 @@ public function test_create_user_sends_admin_notification() {
13991399 */
14001400 public function test_create_user_notification_respects_filter () {
14011401 wp_set_current_user ( self ::$ user );
1402- add_filter ( 'rest_wp_user_created_notification ' , function () {
1403- return 'both ' ;
1404- });
1402+ add_filter (
1403+ 'rest_wp_user_created_notification ' ,
1404+ function () {
1405+ return 'both ' ;
1406+ }
1407+ );
14051408
14061409 reset_phpmailer_instance ();
14071410
14081411 $ user_email =
'[email protected] ' ;
1409- $ request = new WP_REST_Request ( 'POST ' , '/wp/v2/users ' );
1412+ $ request = new WP_REST_Request ( 'POST ' , '/wp/v2/users ' );
14101413 $ request ->set_param ( 'username ' , 'testuser2 ' );
14111414 $ request ->set_param ( 'email ' , $ user_email );
14121415 $ request ->set_param ( 'password ' , 'testpassword2 ' );
You can’t perform that action at this time.
0 commit comments