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

@ -18,10 +18,8 @@ class IsDigitTest extends TestCase
/**
* Provide data to test against the helper function.
*
* @return array
*/
public function helperDataProvider()
public function helperDataProvider(): array
{
return [
[true, false],

View file

@ -21,7 +21,7 @@ class AuthenticateUserTest extends MiddlewareTestCase
}
/**
* Test that a non-admin user results an an exception.
* Test that a non-admin user results in an exception.
*/
public function testNonAdminUser()
{

View file

@ -3,6 +3,7 @@
namespace Pterodactyl\Tests\Unit\Http\Middleware\Api\Daemon;
use Mockery as m;
use Mockery\MockInterface;
use Pterodactyl\Models\Node;
use Illuminate\Contracts\Encryption\Encrypter;
use Pterodactyl\Repositories\Eloquent\NodeRepository;
@ -15,15 +16,9 @@ use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
class DaemonAuthenticateTest extends MiddlewareTestCase
{
/**
* @var \Mockery\MockInterface
*/
private $repository;
private MockInterface $encrypter;
/**
* @var \Mockery\MockInterface
*/
private $encrypter;
private MockInterface $repository;
/**
* Setup tests.

View file

@ -3,16 +3,14 @@
namespace Pterodactyl\Tests\Unit\Http\Middleware;
use Mockery as m;
use Mockery\MockInterface;
use Pterodactyl\Models\User;
use Illuminate\Foundation\Application;
use Pterodactyl\Http\Middleware\LanguageMiddleware;
class LanguageMiddlewareTest extends MiddlewareTestCase
{
/**
* @var \Illuminate\Foundation\Application|\Mockery\Mock
*/
private $appMock;
private MockInterface $appMock;
/**
* Setup tests.

View file

@ -3,6 +3,7 @@
namespace Pterodactyl\Tests\Unit\Http\Middleware;
use Mockery as m;
use Mockery\MockInterface;
use Pterodactyl\Models\Node;
use Illuminate\Http\Response;
use Pterodactyl\Models\Server;
@ -11,10 +12,7 @@ use Pterodactyl\Http\Middleware\MaintenanceMiddleware;
class MaintenanceMiddlewareTest extends MiddlewareTestCase
{
/**
* @var \Illuminate\Contracts\Routing\ResponseFactory|\Mockery\Mock
*/
private $response;
private MockInterface $response;
/**
* Setup tests.

View file

@ -3,16 +3,14 @@
namespace Pterodactyl\Tests\Unit\Http\Middleware;
use Mockery as m;
use Mockery\MockInterface;
use Illuminate\Auth\AuthManager;
use Illuminate\Http\RedirectResponse;
use Pterodactyl\Http\Middleware\RedirectIfAuthenticated;
class RedirectIfAuthenticatedTest extends MiddlewareTestCase
{
/**
* @var \Illuminate\Auth\AuthManager|\Mockery\Mock
*/
private $authManager;
private MockInterface $authManager;
/**
* Setup tests.