forked from Alex/Pterodactyl-Panel
Apply fixes from StyleCI (#607)
This commit is contained in:
parent
f451e4dc47
commit
1e1eac1b9c
@ -24,19 +24,19 @@
|
||||
|
||||
namespace Pterodactyl\Http\Controllers\Admin;
|
||||
|
||||
use Illuminate\Contracts\Config\Repository as ConfigRepository;
|
||||
use Prologue\Alerts\AlertsMessageBag;
|
||||
use Pterodactyl\Contracts\Repository\PackRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\ServiceRepositoryInterface;
|
||||
use Pterodactyl\Http\Requests\Admin\PackFormRequest;
|
||||
use Pterodactyl\Services\Packs\ExportPackService;
|
||||
use Pterodactyl\Services\Packs\PackCreationService;
|
||||
use Pterodactyl\Services\Packs\PackDeletionService;
|
||||
use Pterodactyl\Services\Packs\PackUpdateService;
|
||||
use Pterodactyl\Services\Packs\TemplateUploadService;
|
||||
use Illuminate\Http\Request;
|
||||
use Pterodactyl\Models\Pack;
|
||||
use Prologue\Alerts\AlertsMessageBag;
|
||||
use Pterodactyl\Http\Controllers\Controller;
|
||||
use Pterodactyl\Services\Packs\ExportPackService;
|
||||
use Pterodactyl\Services\Packs\PackUpdateService;
|
||||
use Pterodactyl\Services\Packs\PackCreationService;
|
||||
use Pterodactyl\Services\Packs\PackDeletionService;
|
||||
use Pterodactyl\Http\Requests\Admin\PackFormRequest;
|
||||
use Pterodactyl\Services\Packs\TemplateUploadService;
|
||||
use Pterodactyl\Contracts\Repository\PackRepositoryInterface;
|
||||
use Illuminate\Contracts\Config\Repository as ConfigRepository;
|
||||
use Pterodactyl\Contracts\Repository\ServiceRepositoryInterface;
|
||||
|
||||
class PackController extends Controller
|
||||
{
|
||||
|
@ -24,9 +24,9 @@
|
||||
|
||||
namespace Pterodactyl\Models;
|
||||
|
||||
use Sofa\Eloquence\Eloquence;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Sofa\Eloquence\Contracts\CleansAttributes;
|
||||
use Sofa\Eloquence\Eloquence;
|
||||
|
||||
class Permission extends Model implements CleansAttributes
|
||||
{
|
||||
|
@ -24,12 +24,12 @@
|
||||
|
||||
namespace Pterodactyl\Models;
|
||||
|
||||
use Sofa\Eloquence\Eloquence;
|
||||
use Sofa\Eloquence\Validable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Sofa\Eloquence\Contracts\CleansAttributes;
|
||||
use Sofa\Eloquence\Contracts\Validable as ValidableContract;
|
||||
use Sofa\Eloquence\Eloquence;
|
||||
use Sofa\Eloquence\Validable;
|
||||
|
||||
class Subuser extends Model implements CleansAttributes, ValidableContract
|
||||
{
|
||||
|
@ -25,16 +25,12 @@
|
||||
namespace Pterodactyl\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Pterodactyl\Contracts\Repository\Daemon\CommandRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\Daemon\FileRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\Daemon\PowerRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\PackRepositoryInterface;
|
||||
use Pterodactyl\Repositories\Daemon\CommandRepository;
|
||||
use Pterodactyl\Repositories\Daemon\FileRepository;
|
||||
use Pterodactyl\Repositories\Daemon\PowerRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\NodeRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\PackRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\UserRepository;
|
||||
use Pterodactyl\Repositories\Daemon\CommandRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\ApiKeyRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\ServerRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\ServiceRepository;
|
||||
@ -43,6 +39,7 @@ use Pterodactyl\Repositories\Eloquent\LocationRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\AllocationRepository;
|
||||
use Pterodactyl\Repositories\Daemon\ConfigurationRepository;
|
||||
use Pterodactyl\Contracts\Repository\NodeRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\PackRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\UserRepositoryInterface;
|
||||
use Pterodactyl\Repositories\Eloquent\DatabaseHostRepository;
|
||||
use Pterodactyl\Repositories\Eloquent\ApiPermissionRepository;
|
||||
@ -56,9 +53,12 @@ use Pterodactyl\Repositories\Eloquent\ServiceVariableRepository;
|
||||
use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\LocationRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\AllocationRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\Daemon\FileRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\Daemon\PowerRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\DatabaseHostRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\ApiPermissionRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\ServiceOptionRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\Daemon\CommandRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\OptionVariableRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\ServerVariableRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\ServiceVariableRepositoryInterface;
|
||||
|
@ -25,11 +25,11 @@
|
||||
namespace Pterodactyl\Repositories\Daemon;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
use Webmozart\Assert\Assert;
|
||||
use Illuminate\Foundation\Application;
|
||||
use Pterodactyl\Contracts\Repository\NodeRepositoryInterface;
|
||||
use Illuminate\Contracts\Config\Repository as ConfigRepository;
|
||||
use Pterodactyl\Contracts\Repository\Daemon\BaseRepositoryInterface;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
class BaseRepository implements BaseRepositoryInterface
|
||||
{
|
||||
|
@ -24,8 +24,8 @@
|
||||
|
||||
namespace Pterodactyl\Repositories\Daemon;
|
||||
|
||||
use Pterodactyl\Contracts\Repository\Daemon\FileRepositoryInterface;
|
||||
use Webmozart\Assert\Assert;
|
||||
use Pterodactyl\Contracts\Repository\Daemon\FileRepositoryInterface;
|
||||
|
||||
class FileRepository extends BaseRepository implements FileRepositoryInterface
|
||||
{
|
||||
|
@ -24,10 +24,10 @@
|
||||
|
||||
namespace Pterodactyl\Repositories\Daemon;
|
||||
|
||||
use Webmozart\Assert\Assert;
|
||||
use Pterodactyl\Services\Servers\EnvironmentService;
|
||||
use Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\ServerRepositoryInterface as DatabaseServerRepositoryInterface;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
class ServerRepository extends BaseRepository implements ServerRepositoryInterface
|
||||
{
|
||||
|
@ -24,11 +24,11 @@
|
||||
|
||||
namespace Pterodactyl\Repositories\Eloquent;
|
||||
|
||||
use Pterodactyl\Exceptions\Repository\DuplicateDatabaseNameException;
|
||||
use Pterodactyl\Models\Database;
|
||||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Database\DatabaseManager;
|
||||
use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\Repository\DuplicateDatabaseNameException;
|
||||
|
||||
class DatabaseRepository extends EloquentRepository implements DatabaseRepositoryInterface
|
||||
{
|
||||
|
@ -26,9 +26,9 @@ namespace Pterodactyl\Repositories\Eloquent;
|
||||
|
||||
use Pterodactyl\Models\Location;
|
||||
use Pterodactyl\Exceptions\DisplayException;
|
||||
use Pterodactyl\Repositories\Concerns\Searchable;
|
||||
use Pterodactyl\Exceptions\Repository\RecordNotFoundException;
|
||||
use Pterodactyl\Contracts\Repository\LocationRepositoryInterface;
|
||||
use Pterodactyl\Repositories\Concerns\Searchable;
|
||||
|
||||
class LocationRepository extends EloquentRepository implements LocationRepositoryInterface
|
||||
{
|
||||
|
@ -25,9 +25,9 @@
|
||||
namespace Pterodactyl\Repositories\Eloquent;
|
||||
|
||||
use Pterodactyl\Models\Node;
|
||||
use Pterodactyl\Repositories\Concerns\Searchable;
|
||||
use Pterodactyl\Contracts\Repository\NodeRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\Repository\RecordNotFoundException;
|
||||
use Pterodactyl\Repositories\Concerns\Searchable;
|
||||
|
||||
class NodeRepository extends EloquentRepository implements NodeRepositoryInterface
|
||||
{
|
||||
|
@ -24,12 +24,12 @@
|
||||
|
||||
namespace Pterodactyl\Repositories\Eloquent;
|
||||
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Pterodactyl\Models\Pack;
|
||||
use Illuminate\Contracts\Filesystem\Factory as FilesystemFactory;
|
||||
use Pterodactyl\Repositories\Concerns\Searchable;
|
||||
use Pterodactyl\Contracts\Repository\PackRepositoryInterface;
|
||||
use Webmozart\Assert\Assert;
|
||||
use Pterodactyl\Repositories\Concerns\Searchable;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Pterodactyl\Contracts\Repository\PackRepositoryInterface;
|
||||
use Illuminate\Contracts\Filesystem\Factory as FilesystemFactory;
|
||||
|
||||
class PackRepository extends EloquentRepository implements PackRepositoryInterface
|
||||
{
|
||||
|
@ -24,10 +24,10 @@
|
||||
|
||||
namespace Pterodactyl\Repositories\Eloquent;
|
||||
|
||||
use Pterodactyl\Contracts\Repository\SubuserRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\Repository\RecordNotFoundException;
|
||||
use Pterodactyl\Models\Subuser;
|
||||
use Webmozart\Assert\Assert;
|
||||
use Pterodactyl\Models\Subuser;
|
||||
use Pterodactyl\Exceptions\Repository\RecordNotFoundException;
|
||||
use Pterodactyl\Contracts\Repository\SubuserRepositoryInterface;
|
||||
|
||||
class SubuserRepository extends EloquentRepository implements SubuserRepositoryInterface
|
||||
{
|
||||
|
@ -25,10 +25,10 @@
|
||||
namespace Pterodactyl\Services\Database;
|
||||
|
||||
use Illuminate\Database\DatabaseManager;
|
||||
use Illuminate\Contracts\Encryption\Encrypter;
|
||||
use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\DisplayException;
|
||||
use Illuminate\Contracts\Encryption\Encrypter;
|
||||
use Pterodactyl\Extensions\DynamicDatabaseConnection;
|
||||
use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\DatabaseHostRepositoryInterface;
|
||||
|
||||
class DatabaseHostService
|
||||
|
@ -24,10 +24,10 @@
|
||||
|
||||
namespace Pterodactyl\Services\Nodes;
|
||||
|
||||
use Pterodactyl\Exceptions\Service\HasActiveServersException;
|
||||
use Pterodactyl\Models\Node;
|
||||
use Illuminate\Contracts\Translation\Translator;
|
||||
use Pterodactyl\Contracts\Repository\NodeRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\Service\HasActiveServersException;
|
||||
use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
|
||||
|
||||
class DeletionService
|
||||
|
@ -24,11 +24,11 @@
|
||||
|
||||
namespace Pterodactyl\Services\Packs;
|
||||
|
||||
use Illuminate\Contracts\Filesystem\Factory as FilesystemFactory;
|
||||
use Pterodactyl\Contracts\Repository\PackRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\Service\Pack\ZipArchiveCreationException;
|
||||
use Pterodactyl\Models\Pack;
|
||||
use ZipArchive;
|
||||
use Pterodactyl\Models\Pack;
|
||||
use Pterodactyl\Contracts\Repository\PackRepositoryInterface;
|
||||
use Illuminate\Contracts\Filesystem\Factory as FilesystemFactory;
|
||||
use Pterodactyl\Exceptions\Service\Pack\ZipArchiveCreationException;
|
||||
|
||||
class ExportPackService
|
||||
{
|
||||
|
@ -24,8 +24,8 @@
|
||||
|
||||
namespace Pterodactyl\Services\Packs;
|
||||
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Ramsey\Uuid\Uuid;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Pterodactyl\Contracts\Repository\PackRepositoryInterface;
|
||||
use Illuminate\Contracts\Filesystem\Factory as FilesystemFactory;
|
||||
|
@ -24,18 +24,18 @@
|
||||
|
||||
namespace Pterodactyl\Services\Subusers;
|
||||
|
||||
use Illuminate\Log\Writer;
|
||||
use Pterodactyl\Models\Server;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Illuminate\Log\Writer;
|
||||
use Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface as DaemonServerRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\DisplayException;
|
||||
use Pterodactyl\Services\Users\CreationService;
|
||||
use Pterodactyl\Contracts\Repository\UserRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\SubuserRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\UserRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\DisplayException;
|
||||
use Pterodactyl\Exceptions\Service\Subuser\ServerSubuserExistsException;
|
||||
use Pterodactyl\Exceptions\Service\Subuser\UserIsServerOwnerException;
|
||||
use Pterodactyl\Models\Server;
|
||||
use Pterodactyl\Services\Users\CreationService;
|
||||
use Pterodactyl\Exceptions\Service\Subuser\ServerSubuserExistsException;
|
||||
use Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface as DaemonServerRepositoryInterface;
|
||||
|
||||
class SubuserCreationService
|
||||
{
|
||||
|
@ -24,13 +24,13 @@
|
||||
|
||||
namespace Pterodactyl\Services\Subusers;
|
||||
|
||||
use Illuminate\Log\Writer;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Illuminate\Log\Writer;
|
||||
use Pterodactyl\Contracts\Repository\PermissionRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\SubuserRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface as DaemonServerRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\DisplayException;
|
||||
use Pterodactyl\Contracts\Repository\SubuserRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\PermissionRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface as DaemonServerRepositoryInterface;
|
||||
|
||||
class SubuserUpdateService
|
||||
{
|
||||
|
@ -24,11 +24,11 @@
|
||||
|
||||
namespace Tests\Unit\Repositories\Eloquent;
|
||||
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Mockery as m;
|
||||
use Pterodactyl\Models\Allocation;
|
||||
use Pterodactyl\Repositories\Eloquent\AllocationRepository;
|
||||
use Tests\TestCase;
|
||||
use Pterodactyl\Models\Allocation;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Pterodactyl\Repositories\Eloquent\AllocationRepository;
|
||||
|
||||
class AllocationRepositoryTest extends TestCase
|
||||
{
|
||||
|
@ -24,11 +24,11 @@
|
||||
|
||||
namespace Tests\Unit\Repositories\Eloquent;
|
||||
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Mockery as m;
|
||||
use Pterodactyl\Models\APIKey;
|
||||
use Pterodactyl\Repositories\Eloquent\ApiKeyRepository;
|
||||
use Tests\TestCase;
|
||||
use Pterodactyl\Models\APIKey;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Pterodactyl\Repositories\Eloquent\ApiKeyRepository;
|
||||
|
||||
class ApiKeyRepositoryTest extends TestCase
|
||||
{
|
||||
|
@ -24,11 +24,11 @@
|
||||
|
||||
namespace Tests\Unit\Repositories\Eloquent;
|
||||
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Mockery as m;
|
||||
use Pterodactyl\Models\APIPermission;
|
||||
use Pterodactyl\Repositories\Eloquent\ApiPermissionRepository;
|
||||
use Tests\TestCase;
|
||||
use Pterodactyl\Models\APIPermission;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Pterodactyl\Repositories\Eloquent\ApiPermissionRepository;
|
||||
|
||||
class ApiPermissionRepositoryTest extends TestCase
|
||||
{
|
||||
|
@ -24,11 +24,11 @@
|
||||
|
||||
namespace Tests\Unit\Repositories\Eloquent;
|
||||
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Mockery as m;
|
||||
use Pterodactyl\Models\DatabaseHost;
|
||||
use Pterodactyl\Repositories\Eloquent\DatabaseHostRepository;
|
||||
use Tests\TestCase;
|
||||
use Pterodactyl\Models\DatabaseHost;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Pterodactyl\Repositories\Eloquent\DatabaseHostRepository;
|
||||
|
||||
class DatabaseHostRepositoryTest extends TestCase
|
||||
{
|
||||
|
@ -24,13 +24,13 @@
|
||||
|
||||
namespace Tests\Unit\Repositories\Eloquent;
|
||||
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Mockery as m;
|
||||
use Pterodactyl\Exceptions\DisplayException;
|
||||
use Pterodactyl\Exceptions\Repository\DuplicateDatabaseNameException;
|
||||
use Pterodactyl\Models\Database;
|
||||
use Pterodactyl\Repositories\Eloquent\DatabaseRepository;
|
||||
use Tests\TestCase;
|
||||
use Pterodactyl\Models\Database;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Pterodactyl\Exceptions\DisplayException;
|
||||
use Pterodactyl\Repositories\Eloquent\DatabaseRepository;
|
||||
use Pterodactyl\Exceptions\Repository\DuplicateDatabaseNameException;
|
||||
|
||||
class DatabaseRepositoryTest extends TestCase
|
||||
{
|
||||
|
@ -24,11 +24,11 @@
|
||||
|
||||
namespace Tests\Unit\Repositories\Eloquent;
|
||||
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Mockery as m;
|
||||
use Pterodactyl\Models\Location;
|
||||
use Pterodactyl\Repositories\Eloquent\LocationRepository;
|
||||
use Tests\TestCase;
|
||||
use Pterodactyl\Models\Location;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Pterodactyl\Repositories\Eloquent\LocationRepository;
|
||||
|
||||
class LocationRepositoryTest extends TestCase
|
||||
{
|
||||
|
@ -25,13 +25,13 @@
|
||||
namespace Tests\Unit\Services\Administrative;
|
||||
|
||||
use Mockery as m;
|
||||
use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\DisplayException;
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Database\DatabaseManager;
|
||||
use Pterodactyl\Exceptions\DisplayException;
|
||||
use Illuminate\Contracts\Encryption\Encrypter;
|
||||
use Pterodactyl\Extensions\DynamicDatabaseConnection;
|
||||
use Pterodactyl\Services\Database\DatabaseHostService;
|
||||
use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\DatabaseHostRepositoryInterface;
|
||||
|
||||
class DatabaseHostServiceTest extends TestCase
|
||||
|
@ -25,10 +25,10 @@
|
||||
namespace Tests\Unit\Services\Helpers;
|
||||
|
||||
use Closure;
|
||||
use GuzzleHttp\Client;
|
||||
use Mockery as m;
|
||||
use Pterodactyl\Services\Helpers\SoftwareVersionService;
|
||||
use Tests\TestCase;
|
||||
use GuzzleHttp\Client;
|
||||
use Pterodactyl\Services\Helpers\SoftwareVersionService;
|
||||
use Illuminate\Contracts\Cache\Repository as CacheRepository;
|
||||
use Illuminate\Contracts\Config\Repository as ConfigRepository;
|
||||
|
||||
@ -64,7 +64,7 @@ class SoftwareVersionServiceTest extends TestCase
|
||||
protected $service;
|
||||
|
||||
/**
|
||||
* Setup tests
|
||||
* Setup tests.
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
|
@ -24,14 +24,14 @@
|
||||
|
||||
namespace Tests\Unit\Services\Packs;
|
||||
|
||||
use Illuminate\Contracts\Filesystem\Factory;
|
||||
use Mockery as m;
|
||||
use phpmock\phpunit\PHPMock;
|
||||
use Pterodactyl\Contracts\Repository\PackRepositoryInterface;
|
||||
use Pterodactyl\Models\Pack;
|
||||
use Pterodactyl\Services\Packs\ExportPackService;
|
||||
use Tests\TestCase;
|
||||
use ZipArchive;
|
||||
use Mockery as m;
|
||||
use Tests\TestCase;
|
||||
use phpmock\phpunit\PHPMock;
|
||||
use Pterodactyl\Models\Pack;
|
||||
use Illuminate\Contracts\Filesystem\Factory;
|
||||
use Pterodactyl\Services\Packs\ExportPackService;
|
||||
use Pterodactyl\Contracts\Repository\PackRepositoryInterface;
|
||||
|
||||
class ExportPackServiceTest extends TestCase
|
||||
{
|
||||
|
@ -25,16 +25,16 @@
|
||||
namespace Tests\Unit\Services\Packs;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Contracts\Filesystem\Factory;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Mockery as m;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Pterodactyl\Contracts\Repository\PackRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\Service\Pack\InvalidFileMimeTypeException;
|
||||
use Pterodactyl\Exceptions\Service\Pack\InvalidFileUploadException;
|
||||
use Pterodactyl\Models\Pack;
|
||||
use Pterodactyl\Services\Packs\PackCreationService;
|
||||
use Tests\TestCase;
|
||||
use Pterodactyl\Models\Pack;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Contracts\Filesystem\Factory;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Pterodactyl\Services\Packs\PackCreationService;
|
||||
use Pterodactyl\Contracts\Repository\PackRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\Service\Pack\InvalidFileUploadException;
|
||||
use Pterodactyl\Exceptions\Service\Pack\InvalidFileMimeTypeException;
|
||||
|
||||
class PackCreationServiceTest extends TestCase
|
||||
{
|
||||
|
@ -25,15 +25,15 @@
|
||||
namespace Tests\Unit\Services\Packs;
|
||||
|
||||
use Exception;
|
||||
use Mockery as m;
|
||||
use Tests\TestCase;
|
||||
use Pterodactyl\Models\Pack;
|
||||
use Illuminate\Contracts\Filesystem\Factory;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Mockery as m;
|
||||
use Pterodactyl\Contracts\Repository\PackRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\Service\HasActiveServersException;
|
||||
use Pterodactyl\Models\Pack;
|
||||
use Pterodactyl\Services\Packs\PackDeletionService;
|
||||
use Tests\TestCase;
|
||||
use Pterodactyl\Contracts\Repository\PackRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\Service\HasActiveServersException;
|
||||
use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
|
||||
|
||||
class PackDeletionServiceTest extends TestCase
|
||||
{
|
||||
|
@ -25,12 +25,12 @@
|
||||
namespace Tests\Unit\Services\Packs;
|
||||
|
||||
use Mockery as m;
|
||||
use Pterodactyl\Contracts\Repository\PackRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\Service\HasActiveServersException;
|
||||
use Tests\TestCase;
|
||||
use Pterodactyl\Models\Pack;
|
||||
use Pterodactyl\Services\Packs\PackUpdateService;
|
||||
use Tests\TestCase;
|
||||
use Pterodactyl\Contracts\Repository\PackRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\Service\HasActiveServersException;
|
||||
use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
|
||||
|
||||
class PackUpdateServiceTest extends TestCase
|
||||
{
|
||||
|
@ -24,18 +24,18 @@
|
||||
|
||||
namespace Tests\Unit\Services\Packs;
|
||||
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use ZipArchive;
|
||||
use Mockery as m;
|
||||
use Pterodactyl\Exceptions\Service\Pack\InvalidFileMimeTypeException;
|
||||
use Pterodactyl\Exceptions\Service\Pack\InvalidFileUploadException;
|
||||
use Pterodactyl\Exceptions\Service\Pack\InvalidPackArchiveFormatException;
|
||||
use Pterodactyl\Exceptions\Service\Pack\UnreadableZipArchiveException;
|
||||
use Pterodactyl\Exceptions\Service\Pack\ZipExtractionException;
|
||||
use Tests\TestCase;
|
||||
use Pterodactyl\Models\Pack;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Pterodactyl\Services\Packs\PackCreationService;
|
||||
use Pterodactyl\Services\Packs\TemplateUploadService;
|
||||
use Tests\TestCase;
|
||||
use ZipArchive;
|
||||
use Pterodactyl\Exceptions\Service\Pack\ZipExtractionException;
|
||||
use Pterodactyl\Exceptions\Service\Pack\InvalidFileUploadException;
|
||||
use Pterodactyl\Exceptions\Service\Pack\InvalidFileMimeTypeException;
|
||||
use Pterodactyl\Exceptions\Service\Pack\UnreadableZipArchiveException;
|
||||
use Pterodactyl\Exceptions\Service\Pack\InvalidPackArchiveFormatException;
|
||||
|
||||
class TemplateUploadServiceTest extends TestCase
|
||||
{
|
||||
|
@ -25,9 +25,9 @@
|
||||
namespace Tests\Unit\Services\Subusers;
|
||||
|
||||
use Mockery as m;
|
||||
use Pterodactyl\Contracts\Repository\PermissionRepositoryInterface;
|
||||
use Pterodactyl\Services\Subusers\PermissionCreationService;
|
||||
use Tests\TestCase;
|
||||
use Pterodactyl\Services\Subusers\PermissionCreationService;
|
||||
use Pterodactyl\Contracts\Repository\PermissionRepositoryInterface;
|
||||
|
||||
class PermissionCreationServiceTest extends TestCase
|
||||
{
|
||||
|
@ -24,23 +24,23 @@
|
||||
|
||||
namespace Tests\Unit\Services\Subusers;
|
||||
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Illuminate\Log\Writer;
|
||||
use Mockery as m;
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Log\Writer;
|
||||
use phpmock\phpunit\PHPMock;
|
||||
use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\SubuserRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\UserRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\DisplayException;
|
||||
use Pterodactyl\Exceptions\Service\Subuser\ServerSubuserExistsException;
|
||||
use Pterodactyl\Exceptions\Service\Subuser\UserIsServerOwnerException;
|
||||
use Pterodactyl\Models\User;
|
||||
use Pterodactyl\Models\Server;
|
||||
use Pterodactyl\Models\Subuser;
|
||||
use Pterodactyl\Models\User;
|
||||
use Pterodactyl\Services\Subusers\PermissionCreationService;
|
||||
use Pterodactyl\Services\Subusers\SubuserCreationService;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Pterodactyl\Exceptions\DisplayException;
|
||||
use Pterodactyl\Services\Users\CreationService;
|
||||
use Tests\TestCase;
|
||||
use Pterodactyl\Services\Subusers\SubuserCreationService;
|
||||
use Pterodactyl\Services\Subusers\PermissionCreationService;
|
||||
use Pterodactyl\Contracts\Repository\UserRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\SubuserRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\Service\Subuser\UserIsServerOwnerException;
|
||||
use Pterodactyl\Exceptions\Service\Subuser\ServerSubuserExistsException;
|
||||
use Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface as DaemonServerRepositoryInterface;
|
||||
|
||||
class SubuserCreationServiceTest extends TestCase
|
||||
@ -200,7 +200,7 @@ class SubuserCreationServiceTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that an exception gets thrown if the subuser is actually the server owner
|
||||
* Test that an exception gets thrown if the subuser is actually the server owner.
|
||||
*/
|
||||
public function testExceptionIsThrownIfUserIsServerOwner()
|
||||
{
|
||||
@ -237,6 +237,5 @@ class SubuserCreationServiceTest extends TestCase
|
||||
$this->assertInstanceOf(ServerSubuserExistsException::class, $exception);
|
||||
$this->assertEquals(trans('admin/exceptions.subusers.subuser_exists'), $exception->getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -24,16 +24,16 @@
|
||||
|
||||
namespace Tests\Unit\Services\Subusers;
|
||||
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Illuminate\Log\Writer;
|
||||
use Mockery as m;
|
||||
use Pterodactyl\Contracts\Repository\SubuserRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\DisplayException;
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Log\Writer;
|
||||
use Pterodactyl\Models\Server;
|
||||
use Pterodactyl\Models\Subuser;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Pterodactyl\Exceptions\DisplayException;
|
||||
use Pterodactyl\Services\Subusers\SubuserDeletionService;
|
||||
use Tests\TestCase;
|
||||
use Pterodactyl\Contracts\Repository\SubuserRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface as DaemonServerRepositoryInterface;
|
||||
|
||||
class SubuserDeletionServiceTest extends TestCase
|
||||
@ -135,5 +135,4 @@ class SubuserDeletionServiceTest extends TestCase
|
||||
$this->assertEquals(trans('admin/exceptions.daemon_connection_failed', ['code' => 'E_CONN_REFUSED']), $exception->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -24,18 +24,18 @@
|
||||
|
||||
namespace Tests\Unit\Services\Subusers;
|
||||
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Illuminate\Log\Writer;
|
||||
use Mockery as m;
|
||||
use Pterodactyl\Contracts\Repository\PermissionRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\SubuserRepositoryInterface;
|
||||
use Pterodactyl\Exceptions\DisplayException;
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Log\Writer;
|
||||
use Pterodactyl\Models\Server;
|
||||
use Pterodactyl\Models\Subuser;
|
||||
use Pterodactyl\Services\Subusers\PermissionCreationService;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Pterodactyl\Exceptions\DisplayException;
|
||||
use Pterodactyl\Services\Subusers\SubuserUpdateService;
|
||||
use Tests\TestCase;
|
||||
use Pterodactyl\Services\Subusers\PermissionCreationService;
|
||||
use Pterodactyl\Contracts\Repository\SubuserRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\PermissionRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface as DaemonServerRepositoryInterface;
|
||||
|
||||
class SubuserUpdateServiceTest extends TestCase
|
||||
|
Loading…
Reference in New Issue
Block a user