Skip to content

Commit b7efb8a

Browse files
Tests: Grant super-admin priviliges for multisites
1 parent 9cd596a commit b7efb8a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/phpunit/tests/rest-api/rest-users-controller.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,6 +1380,10 @@ public function test_create_item() {
13801380
* @ticket 40477
13811381
*/
13821382
public function test_create_user_sends_admin_notification() {
1383+
if ( is_multisite() ) {
1384+
grant_super_admin( self::$user );
1385+
}
1386+
13831387
wp_set_current_user( self::$user );
13841388
reset_phpmailer_instance();
13851389

@@ -1400,6 +1404,10 @@ public function test_create_user_sends_admin_notification() {
14001404
* @ticket 40477
14011405
*/
14021406
public function test_create_user_notification_respects_filter() {
1407+
if ( is_multisite() ) {
1408+
grant_super_admin( self::$user );
1409+
}
1410+
14031411
wp_set_current_user( self::$user );
14041412
add_filter(
14051413
'rest_wp_user_created_notification',

0 commit comments

Comments
 (0)