Upgrade to Laravel 9 (#4413)

Co-authored-by: DaneEveritt <dane@daneeveritt.com>
This commit is contained in:
Matthew Penner 2022-10-14 10:59:20 -06:00 committed by GitHub
parent 95e15d2c8a
commit cbcf62086f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
573 changed files with 4387 additions and 9411 deletions

View file

@ -17,10 +17,9 @@ class CreateServerSubuserTest extends ClientApiIntegrationTestCase
/**
* Test that a subuser can be created for a server.
*
* @param array $permissions
* @dataProvider permissionsDataProvider
*/
public function testSubuserCanBeCreated($permissions)
public function testSubuserCanBeCreated(array $permissions)
{
[$user, $server] = $this->generateTestAccount($permissions);
@ -62,7 +61,7 @@ class CreateServerSubuserTest extends ClientApiIntegrationTestCase
]);
$response = $this->actingAs($user)->postJson($this->link($server) . '/users', [
'email' => $email = $this->faker->email,
'email' => $this->faker->email,
'permissions' => [
Permission::ACTION_USER_CREATE,
Permission::ACTION_USER_UPDATE, // This permission is not assigned to the subuser.

View file

@ -47,7 +47,7 @@ class DeleteSubuserTest extends ClientApiIntegrationTestCase
$mock->expects('setServer->revokeUserJTI')->with($subuser->id)->andReturnUndefined();
$this->actingAs($user)->deleteJson($this->link($server) . "/users/{$subuser->uuid}")->assertNoContent();
$this->actingAs($user)->deleteJson($this->link($server) . "/users/$subuser->uuid")->assertNoContent();
// Try the same test, but this time with a UUID that if cast to an int (shouldn't) line up with
// anything in the database.
@ -63,6 +63,6 @@ class DeleteSubuserTest extends ClientApiIntegrationTestCase
$mock->expects('setServer->revokeUserJTI')->with($subuser->id)->andReturnUndefined();
$this->actingAs($user)->deleteJson($this->link($server) . "/users/{$subuser->uuid}")->assertNoContent();
$this->actingAs($user)->deleteJson($this->link($server) . "/users/$subuser->uuid")->assertNoContent();
}
}

View file

@ -50,9 +50,6 @@ class SubuserAuthorizationTest extends ClientApiIntegrationTestCase
$this->actingAs($user)->json($method, $this->link($server3, '/users/' . $internal->uuid))->assertNotFound();
}
/**
* @return \string[][]
*/
public function methodDataProvider(): array
{
return [['GET'], ['POST'], ['DELETE']];