Upgrade to Laravel 9 (#4413)
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
This commit is contained in:
parent
95e15d2c8a
commit
cbcf62086f
573 changed files with 4387 additions and 9411 deletions
|
@ -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.
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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']];
|
||||
|
|
Reference in a new issue