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

@ -23,11 +23,9 @@ class GetServerSchedulesTest extends ClientApiIntegrationTestCase
/**
* Test that schedules for a server are returned.
*
* @param array $permissions
* @param bool $individual
* @dataProvider permissionsDataProvider
*/
public function testServerSchedulesAreReturned($permissions, $individual)
public function testServerSchedulesAreReturned(array $permissions, bool $individual)
{
[$user, $server] = $this->generateTestAccount($permissions);
@ -39,8 +37,8 @@ class GetServerSchedulesTest extends ClientApiIntegrationTestCase
$response = $this->actingAs($user)
->getJson(
$individual
? "/api/client/servers/{$server->uuid}/schedules/{$schedule->id}"
: "/api/client/servers/{$server->uuid}/schedules"
? "/api/client/servers/$server->uuid/schedules/$schedule->id"
: "/api/client/servers/$server->uuid/schedules"
)
->assertOk();
@ -69,7 +67,7 @@ class GetServerSchedulesTest extends ClientApiIntegrationTestCase
$schedule = Schedule::factory()->create(['server_id' => $server2->id]);
$this->actingAs($user)
->getJson("/api/client/servers/{$server->uuid}/schedules/{$schedule->id}")
->getJson("/api/client/servers/$server->uuid/schedules/$schedule->id")
->assertNotFound();
}
@ -81,13 +79,13 @@ class GetServerSchedulesTest extends ClientApiIntegrationTestCase
[$user, $server] = $this->generateTestAccount([Permission::ACTION_WEBSOCKET_CONNECT]);
$this->actingAs($user)
->getJson("/api/client/servers/{$server->uuid}/schedules")
->getJson("/api/client/servers/$server->uuid/schedules")
->assertForbidden();
$schedule = Schedule::factory()->create(['server_id' => $server->id]);
$this->actingAs($user)
->getJson("/api/client/servers/{$server->uuid}/schedules/{$schedule->id}")
->getJson("/api/client/servers/$server->uuid/schedules/$schedule->id")
->assertForbidden();
}