Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix permissions issue on multisite test
  • Loading branch information
glendaviesnz authored and aristath committed Feb 3, 2023
commit 95253233055c44c3895116cc30183216b83c1dcf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ public function set_up() {
* @param WP_UnitTest_Factory $factory Helper that lets us create fake data.
*/
public static function wpSetupBeforeClass( $factory ) {
if ( is_multisite() ) {
grant_super_admin( self::$admin_id );
}

self::$admin_id = $factory->user->create(
array(
'role' => 'administrator',
Expand Down