Fix tests by adding required return type hints

This commit is contained in:
devfrey 2020-05-09 18:00:52 +02:00
parent 6967b76ae6
commit 2fecba2500
94 changed files with 96 additions and 96 deletions

View file

@ -49,7 +49,7 @@ abstract class BrowserTestCase extends TestCase
/**
* Setup tests.
*/
protected function setUp()
protected function setUp(): void
{
// Don't accidentally run the migrations aganist the non-testing database. Ask me
// how many times I've accidentally dropped my database...
@ -97,7 +97,7 @@ abstract class BrowserTestCase extends TestCase
* Tear down the test and delete all cookies from the browser instance to address
* instances where the test would be kicked over to the login page.
*/
protected function tearDown()
protected function tearDown(): void
{
/** @var \Pterodactyl\Tests\Browser\PterodactylBrowser $browser */
foreach (static::$browsers as $browser) {

View file

@ -14,7 +14,7 @@ class LoginProcessTest extends BrowserTestCase
/**
* Setup tests.
*/
protected function setUp()
protected function setUp(): void
{
parent::setUp();

View file

@ -14,7 +14,7 @@ abstract class DashboardTestCase extends BrowserTestCase
/**
* Setup tests and provide a default user to calling functions.
*/
protected function setUp()
protected function setUp(): void
{
parent::setUp();

View file

@ -31,7 +31,7 @@ abstract class ApplicationApiIntegrationTestCase extends IntegrationTestCase
* Bootstrap application API tests. Creates a default admin user and associated API key
* and also sets some default headers required for accessing the API.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -18,7 +18,7 @@ class EggControllerTest extends ApplicationApiIntegrationTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -17,7 +17,7 @@ class NestControllerTest extends ApplicationApiIntegrationTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -12,7 +12,7 @@ abstract class IntegrationTestCase extends TestCase
/**
* Setup base integration test cases.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -12,7 +12,7 @@ abstract class TestCase extends BaseTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
@ -22,7 +22,7 @@ abstract class TestCase extends BaseTestCase
/**
* Tear down tests.
*/
protected function tearDown()
protected function tearDown(): void
{
parent::tearDown();

View file

@ -29,7 +29,7 @@ class EmailSettingsCommandTest extends CommandTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -36,7 +36,7 @@ class DeleteLocationCommandTest extends CommandTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -30,7 +30,7 @@ class MakeLocationCommandTest extends CommandTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -30,7 +30,7 @@ class CleanServiceBackupFilesCommandTest extends CommandTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -38,7 +38,7 @@ class ProcessRunnableCommandTest extends CommandTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -27,7 +27,7 @@ class BulkPowerActionCommandTest extends CommandTestCase
/**
* Setup test.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -32,7 +32,7 @@ class DeleteUserCommandTest extends CommandTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -30,7 +30,7 @@ class DisableTwoFactorCommandTest extends CommandTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -30,7 +30,7 @@ class MakeUserCommandTest extends CommandTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -65,7 +65,7 @@ class DatabaseControllerTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -40,7 +40,7 @@ class MailControllerTest extends ControllerTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -54,7 +54,7 @@ class StatisticsControllerTest extends ControllerTestCase
*/
private $userRepository;
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -52,7 +52,7 @@ class IndexControllerTest extends ControllerTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -44,7 +44,7 @@ class SecurityControllerTest extends ControllerTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -19,7 +19,7 @@ abstract class ControllerTestCase extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -34,7 +34,7 @@ class AuthenticateKeyTest extends MiddlewareTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
Chronos::setTestNow(Chronos::now());

View file

@ -17,7 +17,7 @@ class SetSessionDriverTest extends MiddlewareTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -20,7 +20,7 @@ class DaemonAuthenticateTest extends MiddlewareTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -17,7 +17,7 @@ class DaemonAuthenticateTest extends MiddlewareTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -17,7 +17,7 @@ class LanguageMiddlewareTest extends MiddlewareTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -19,7 +19,7 @@ class MaintenanceMiddlewareTest extends MiddlewareTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -14,7 +14,7 @@ abstract class MiddlewareTestCase extends TestCase
/**
* Setup tests with a mocked request object and normal attributes.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -17,7 +17,7 @@ class RedirectIfAuthenticatedTest extends MiddlewareTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -18,7 +18,7 @@ class RequireTwoFactorAuthenticationTest extends MiddlewareTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -30,7 +30,7 @@ class AccessingValidServerTest extends MiddlewareTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -19,7 +19,7 @@ class AuthenticateAsSubuserTest extends MiddlewareTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -19,7 +19,7 @@ class DatabaseBelongsToServerTest extends MiddlewareTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -22,7 +22,7 @@ class ScheduleBelongsToServerTest extends MiddlewareTestCase
*/
private $repository;
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -27,7 +27,7 @@ class SubuserBelongsToServerTest extends MiddlewareTestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -54,7 +54,7 @@ class RunTaskJobTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
Bus::fake();

View file

@ -15,7 +15,7 @@ class AllocationDeletionServiceTest extends TestCase
*/
private $repository;
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -29,7 +29,7 @@ class AssignmentServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -44,7 +44,7 @@ class SetDefaultAllocationServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -27,7 +27,7 @@ class KeyCreationServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -59,7 +59,7 @@ class DaemonKeyCreationServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -48,7 +48,7 @@ class DaemonKeyProviderServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
Carbon::setTestNow(Carbon::now());

View file

@ -44,7 +44,7 @@ class DaemonKeyUpdateServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -30,7 +30,7 @@ class RevokeMultipleDaemonKeysServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -36,7 +36,7 @@ class DatabasePasswordServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -31,7 +31,7 @@ class DeployServerDatabaseServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -42,7 +42,7 @@ class HostCreationServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -25,7 +25,7 @@ class HostDeletionServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -42,7 +42,7 @@ class HostUpdateServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -23,7 +23,7 @@ class EggConfigurationServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -41,7 +41,7 @@ class EggCreationServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -38,7 +38,7 @@ class EggDeletionServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -37,7 +37,7 @@ class EggUpdateServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -48,7 +48,7 @@ class InstallScriptServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -40,7 +40,7 @@ class EggExporterServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -62,7 +62,7 @@ class EggImporterServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -45,7 +45,7 @@ class EggUpdateImporterServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -25,7 +25,7 @@ class VariableCreationServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -32,7 +32,7 @@ class VariableUpdateServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -51,7 +51,7 @@ class SoftwareVersionServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -30,7 +30,7 @@ class LocationCreationServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -37,7 +37,7 @@ class LocationDeletionServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -30,7 +30,7 @@ class LocationUpdateServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -34,7 +34,7 @@ class NestCreationServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -37,7 +37,7 @@ class NestDeletionServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -29,7 +29,7 @@ class NestUpdateServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -32,7 +32,7 @@ class NodeCreationServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -42,7 +42,7 @@ class NodeDeletionServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -36,7 +36,7 @@ class NodeUpdateServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -45,7 +45,7 @@ class ExportPackServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -54,7 +54,7 @@ class PackCreationServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -49,7 +49,7 @@ class PackDeletionServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -37,7 +37,7 @@ class PackUpdateServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -49,7 +49,7 @@ class TemplateUploadServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -33,7 +33,7 @@ class ProcessScheduleServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -27,7 +27,7 @@ class EnvironmentServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -55,7 +55,7 @@ class ReinstallServerServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -26,7 +26,7 @@ class ServerConfigurationStructureServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -89,7 +89,7 @@ class ServerCreationServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -52,7 +52,7 @@ class ServerDeletionServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -22,7 +22,7 @@ class StartupCommandViewServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -57,7 +57,7 @@ class StartupModificationServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -62,7 +62,7 @@ class SuspensionServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -34,7 +34,7 @@ class VariableValidatorServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -29,7 +29,7 @@ class PermissionCreationServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -65,7 +65,7 @@ class SubuserCreationServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -64,7 +64,7 @@ class SubuserUpdateServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -41,7 +41,7 @@ class ToggleTwoFactorServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
Carbon::setTestNow(Carbon::now());

View file

@ -30,7 +30,7 @@ class TwoFactorSetupServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -41,7 +41,7 @@ class UserCreationServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -47,7 +47,7 @@ class UserDeletionServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

View file

@ -31,7 +31,7 @@ class UserUpdateServiceTest extends TestCase
/**
* Setup tests.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();