From 73fb2c137a7b3cca96e7e6400a9837386580eee4 Mon Sep 17 00:00:00 2001 From: Timothy Jacobs Date: Thu, 15 Oct 2020 02:11:28 +0000 Subject: [PATCH] REST API: Grant super admin to site health test user. The current user needs to be a super admin to access Site Health on multisite. Follow up to [49154]. See #48105. git-svn-id: https://develop.svn.wordpress.org/trunk@49155 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/rest-api/rest-site-health-controller.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/phpunit/tests/rest-api/rest-site-health-controller.php b/tests/phpunit/tests/rest-api/rest-site-health-controller.php index 670380f30d..07b69d958c 100644 --- a/tests/phpunit/tests/rest-api/rest-site-health-controller.php +++ b/tests/phpunit/tests/rest-api/rest-site-health-controller.php @@ -50,6 +50,10 @@ class WP_Test_REST_Site_Health_Controller extends WP_Test_REST_TestCase { 'role' => 'administrator', ) ); + + if ( is_multisite() ) { + grant_super_admin( self::$admin ); + } } /**