Skip to content

Commit a700783

Browse files
westonruterb1ink0
andcommitted
Grant super admin for test
Co-authored-by: Aditya Dhade <[email protected]>
1 parent efcbd08 commit a700783

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugins/performance-lab/tests/includes/site-health/audit-enqueued-assets/test-audit-enqueued-assets-helper.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,9 @@ public function test_perflab_aea_enqueued_ajax_blocking_assets_test_unauthorized
346346
*/
347347
public function test_perflab_aea_enqueued_ajax_blocking_assets_test_authorized(): void {
348348
$this->add_filter_to_mock_front_page_loopback_request();
349-
wp_set_current_user( self::factory()->user->create( array( 'role' => 'administrator' ) ) );
349+
$admin_id = self::factory()->user->create( array( 'role' => 'administrator' ) );
350+
wp_set_current_user( $admin_id );
351+
grant_super_admin( $admin_id );
350352
$this->assertTrue( current_user_can( 'view_site_health_checks' ) );
351353
$_GET['_wpnonce'] = wp_create_nonce( 'health-check-site-status' );
352354
$exception = null;

0 commit comments

Comments
 (0)