Skip to content

Commit 0919e59

Browse files
committed
bugfix
1 parent fdd7156 commit 0919e59

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/phpunit/test-class-plugin-installer.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ public function setUp(): void {
3939
public function test_check_capabilities_with_permission() {
4040
// Create a user with install_plugins capability.
4141
$user_id = $this->factory->user->create( [ 'role' => 'administrator' ] );
42+
43+
// In multisite, only super admins can install plugins.
44+
if ( \is_multisite() ) {
45+
\grant_super_admin( $user_id );
46+
}
47+
4248
\wp_set_current_user( $user_id );
4349

4450
$result = $this->installer_instance->check_capabilities();

0 commit comments

Comments
 (0)