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. * Setup tests.
*/ */
protected function setUp() protected function setUp(): void
{ {
// Don't accidentally run the migrations aganist the non-testing database. Ask me // Don't accidentally run the migrations aganist the non-testing database. Ask me
// how many times I've accidentally dropped my database... // 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 * 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. * 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 */ /** @var \Pterodactyl\Tests\Browser\PterodactylBrowser $browser */
foreach (static::$browsers as $browser) { foreach (static::$browsers as $browser) {

View File

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

View File

@ -14,7 +14,7 @@ abstract class DashboardTestCase extends BrowserTestCase
/** /**
* Setup tests and provide a default user to calling functions. * Setup tests and provide a default user to calling functions.
*/ */
protected function setUp() protected function setUp(): void
{ {
parent::setUp(); 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 * Bootstrap application API tests. Creates a default admin user and associated API key
* and also sets some default headers required for accessing the API. * and also sets some default headers required for accessing the API.
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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