Merge branch '1.0-develop' into develop
This commit is contained in:
commit
18f6611a2d
60 changed files with 181 additions and 152 deletions
|
@ -241,7 +241,7 @@ class ApiKeyControllerTest extends ClientApiIntegrationTestCase
|
|||
* Provides some different IP address combinations that can be used when
|
||||
* testing that we accept the expected IP values.
|
||||
*/
|
||||
public function validIPAddressDataProvider(): array
|
||||
public static function validIPAddressDataProvider(): array
|
||||
{
|
||||
return [
|
||||
[[]],
|
||||
|
|
|
@ -331,7 +331,7 @@ class ClientControllerTest extends ClientApiIntegrationTestCase
|
|||
$response->assertJsonPath('data.0.attributes.relationships.allocations.data.0.attributes.notes', null);
|
||||
}
|
||||
|
||||
public function filterTypeDataProvider(): array
|
||||
public static function filterTypeDataProvider(): array
|
||||
{
|
||||
return [['admin'], ['admin-all']];
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ class AllocationAuthorizationTest extends ClientApiIntegrationTestCase
|
|||
$this->actingAs($user)->json($method, $this->link($server3, '/network/allocations/' . $allocation3->id . $endpoint))->assertNotFound();
|
||||
}
|
||||
|
||||
public function methodDataProvider(): array
|
||||
public static function methodDataProvider(): array
|
||||
{
|
||||
return [
|
||||
['POST', ''],
|
||||
|
|
|
@ -86,7 +86,7 @@ class CreateNewAllocationTest extends ClientApiIntegrationTestCase
|
|||
->assertJsonPath('errors.0.detail', 'Cannot assign additional allocations to this server: limit has been reached.');
|
||||
}
|
||||
|
||||
public function permissionDataProvider(): array
|
||||
public static function permissionDataProvider(): array
|
||||
{
|
||||
return [[[Permission::ACTION_ALLOCATION_CREATE]], [[]]];
|
||||
}
|
||||
|
|
|
@ -98,10 +98,7 @@ class DeleteAllocationTest extends ClientApiIntegrationTestCase
|
|||
$this->actingAs($user)->deleteJson($this->link($server, "/network/allocations/{$server2->allocation_id}"))->assertNotFound();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function permissionDataProvider()
|
||||
public static function permissionDataProvider(): array
|
||||
{
|
||||
return [[[Permission::ACTION_ALLOCATION_DELETE]], [[]]];
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ class BackupAuthorizationTest extends ClientApiIntegrationTestCase
|
|||
$this->actingAs($user)->json($method, $this->link($server3, '/backups/' . $backup3->uuid . $endpoint))->assertNotFound();
|
||||
}
|
||||
|
||||
public function methodDataProvider(): array
|
||||
public static function methodDataProvider(): array
|
||||
{
|
||||
return [
|
||||
['GET', ''],
|
||||
|
|
|
@ -58,7 +58,7 @@ class DatabaseAuthorizationTest extends ClientApiIntegrationTestCase
|
|||
$this->actingAs($user)->json($method, $this->link($server3, '/databases/' . $hashids->encode($database3->id) . $endpoint))->assertNotFound();
|
||||
}
|
||||
|
||||
public function methodDataProvider(): array
|
||||
public static function methodDataProvider(): array
|
||||
{
|
||||
return [
|
||||
['POST', '/rotate-password'],
|
||||
|
|
|
@ -133,7 +133,7 @@ class NetworkAllocationControllerTest extends ClientApiIntegrationTestCase
|
|||
->assertForbidden();
|
||||
}
|
||||
|
||||
public function updatePermissionsDataProvider(): array
|
||||
public static function updatePermissionsDataProvider(): array
|
||||
{
|
||||
return [[[]], [[Permission::ACTION_ALLOCATION_UPDATE]]];
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ class PowerControllerTest extends ClientApiIntegrationTestCase
|
|||
/**
|
||||
* Returns invalid permission combinations for a given power action.
|
||||
*/
|
||||
public function invalidPermissionDataProvider(): array
|
||||
public static function invalidPermissionDataProvider(): array
|
||||
{
|
||||
return [
|
||||
['start', [Permission::ACTION_CONTROL_STOP, Permission::ACTION_CONTROL_RESTART]],
|
||||
|
@ -83,7 +83,7 @@ class PowerControllerTest extends ClientApiIntegrationTestCase
|
|||
];
|
||||
}
|
||||
|
||||
public function validPowerActionDataProvider(): array
|
||||
public static function validPowerActionDataProvider(): array
|
||||
{
|
||||
return [
|
||||
['start', Permission::ACTION_CONTROL_START],
|
||||
|
|
|
@ -89,7 +89,7 @@ class CreateServerScheduleTest extends ClientApiIntegrationTestCase
|
|||
->assertForbidden();
|
||||
}
|
||||
|
||||
public function permissionsDataProvider(): array
|
||||
public static function permissionsDataProvider(): array
|
||||
{
|
||||
return [[[]], [[Permission::ACTION_SCHEDULE_CREATE]]];
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ class DeleteServerScheduleTest extends ClientApiIntegrationTestCase
|
|||
$this->assertDatabaseHas('schedules', ['id' => $schedule->id]);
|
||||
}
|
||||
|
||||
public function permissionsDataProvider(): array
|
||||
public static function permissionsDataProvider(): array
|
||||
{
|
||||
return [[[]], [[Permission::ACTION_SCHEDULE_DELETE]]];
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ class ExecuteScheduleTest extends ClientApiIntegrationTestCase
|
|||
$this->actingAs($user)->postJson($this->link($schedule, '/execute'))->assertForbidden();
|
||||
}
|
||||
|
||||
public function permissionsDataProvider(): array
|
||||
public static function permissionsDataProvider(): array
|
||||
{
|
||||
return [[[]], [[Permission::ACTION_SCHEDULE_UPDATE]]];
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ class GetServerSchedulesTest extends ClientApiIntegrationTestCase
|
|||
->assertForbidden();
|
||||
}
|
||||
|
||||
public function permissionsDataProvider(): array
|
||||
public static function permissionsDataProvider(): array
|
||||
{
|
||||
return [
|
||||
[[], false],
|
||||
|
|
|
@ -54,7 +54,7 @@ class ScheduleAuthorizationTest extends ClientApiIntegrationTestCase
|
|||
$this->actingAs($user)->json($method, $this->link($server3, '/schedules/' . $schedule3->id . $endpoint))->assertNotFound();
|
||||
}
|
||||
|
||||
public function methodDataProvider(): array
|
||||
public static function methodDataProvider(): array
|
||||
{
|
||||
return [
|
||||
['GET', ''],
|
||||
|
|
|
@ -109,7 +109,7 @@ class UpdateServerScheduleTest extends ClientApiIntegrationTestCase
|
|||
$this->assertFalse($schedule->is_processing);
|
||||
}
|
||||
|
||||
public function permissionsDataProvider(): array
|
||||
public static function permissionsDataProvider(): array
|
||||
{
|
||||
return [[[]], [[Permission::ACTION_SCHEDULE_UPDATE]]];
|
||||
}
|
||||
|
|
|
@ -170,7 +170,7 @@ class CreateServerScheduleTaskTest extends ClientApiIntegrationTestCase
|
|||
->assertForbidden();
|
||||
}
|
||||
|
||||
public function permissionsDataProvider(): array
|
||||
public static function permissionsDataProvider(): array
|
||||
{
|
||||
return [[[]], [[Permission::ACTION_SCHEDULE_UPDATE]]];
|
||||
}
|
||||
|
|
|
@ -112,12 +112,12 @@ class SettingsControllerTest extends ClientApiIntegrationTestCase
|
|||
$this->assertTrue($server->isInstalled());
|
||||
}
|
||||
|
||||
public function renamePermissionsDataProvider(): array
|
||||
public static function renamePermissionsDataProvider(): array
|
||||
{
|
||||
return [[[]], [[Permission::ACTION_SETTINGS_RENAME]]];
|
||||
}
|
||||
|
||||
public function reinstallPermissionsDataProvider(): array
|
||||
public static function reinstallPermissionsDataProvider(): array
|
||||
{
|
||||
return [[[]], [[Permission::ACTION_SETTINGS_REINSTALL]]];
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ class GetStartupAndVariablesTest extends ClientApiIntegrationTestCase
|
|||
$this->actingAs($user2)->getJson($this->link($server) . '/startup')->assertNotFound();
|
||||
}
|
||||
|
||||
public function permissionsDataProvider(): array
|
||||
public static function permissionsDataProvider(): array
|
||||
{
|
||||
return [[[]], [[Permission::ACTION_STARTUP_READ]]];
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ class UpdateStartupVariableTest extends ClientApiIntegrationTestCase
|
|||
$this->actingAs($user2)->putJson($this->link($server) . '/startup/variable')->assertNotFound();
|
||||
}
|
||||
|
||||
public function permissionsDataProvider(): array
|
||||
public static function permissionsDataProvider(): array
|
||||
{
|
||||
return [[[]], [[Permission::ACTION_STARTUP_UPDATE]]];
|
||||
}
|
||||
|
|
|
@ -155,7 +155,7 @@ class CreateServerSubuserTest extends ClientApiIntegrationTestCase
|
|||
$response->assertJsonPath('errors.0.detail', 'A user with that email address is already assigned as a subuser for this server.');
|
||||
}
|
||||
|
||||
public function permissionsDataProvider(): array
|
||||
public static function permissionsDataProvider(): array
|
||||
{
|
||||
return [[[]], [[Permission::ACTION_USER_CREATE]]];
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ class SubuserAuthorizationTest extends ClientApiIntegrationTestCase
|
|||
$this->actingAs($user)->json($method, $this->link($server3, '/users/' . $internal->uuid))->assertNotFound();
|
||||
}
|
||||
|
||||
public function methodDataProvider(): array
|
||||
public static function methodDataProvider(): array
|
||||
{
|
||||
return [['GET'], ['POST'], ['DELETE']];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue