Begin moving packs to new service mechanisms, refactor exceptions for services

This commit is contained in:
Dane Everitt 2017-08-18 22:19:06 -05:00
parent 46cb71e69d
commit 9d3dca87f2
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
62 changed files with 492 additions and 303 deletions

View file

@ -30,7 +30,7 @@ use Tests\TestCase;
use Pterodactyl\Models\ServiceOption;
use Pterodactyl\Services\Services\Options\InstallScriptUpdateService;
use Pterodactyl\Contracts\Repository\ServiceOptionRepositoryInterface;
use Pterodactyl\Exceptions\Services\ServiceOption\InvalidCopyFromException;
use Pterodactyl\Exceptions\Service\ServiceOption\InvalidCopyFromException;
class InstallScriptUpdateServiceTest extends TestCase
{

View file

@ -30,7 +30,7 @@ use Tests\TestCase;
use Pterodactyl\Models\ServiceOption;
use Pterodactyl\Services\Services\Options\OptionCreationService;
use Pterodactyl\Contracts\Repository\ServiceOptionRepositoryInterface;
use Pterodactyl\Exceptions\Services\ServiceOption\NoParentConfigurationFoundException;
use Pterodactyl\Exceptions\Service\ServiceOption\NoParentConfigurationFoundException;
class OptionCreationServiceTest extends TestCase
{

View file

@ -26,7 +26,7 @@ namespace Tests\Unit\Services\Services\Options;
use Mockery as m;
use Tests\TestCase;
use Pterodactyl\Exceptions\Services\HasActiveServersException;
use Pterodactyl\Exceptions\Service\HasActiveServersException;
use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
use Pterodactyl\Services\Services\Options\OptionDeletionService;
use Pterodactyl\Contracts\Repository\ServiceOptionRepositoryInterface;

View file

@ -30,7 +30,7 @@ use Tests\TestCase;
use Pterodactyl\Models\ServiceOption;
use Pterodactyl\Services\Services\Options\OptionUpdateService;
use Pterodactyl\Contracts\Repository\ServiceOptionRepositoryInterface;
use Pterodactyl\Exceptions\Services\ServiceOption\NoParentConfigurationFoundException;
use Pterodactyl\Exceptions\Service\ServiceOption\NoParentConfigurationFoundException;
class OptionUpdateServiceTest extends TestCase
{

View file

@ -28,7 +28,7 @@ use Exception;
use Mockery as m;
use Tests\TestCase;
use Pterodactyl\Services\Services\ServiceDeletionService;
use Pterodactyl\Exceptions\Services\HasActiveServersException;
use Pterodactyl\Exceptions\Service\HasActiveServersException;
use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
use Pterodactyl\Contracts\Repository\ServiceRepositoryInterface;

View file

@ -99,7 +99,7 @@ class VariableCreationServiceTest extends TestCase
* Test that all of the reserved variables defined in the model trigger an exception.
*
* @dataProvider reservedNamesProvider
* @expectedException \Pterodactyl\Exceptions\Services\ServiceVariable\ReservedVariableNameException
* @expectedException \Pterodactyl\Exceptions\Service\ServiceVariable\ReservedVariableNameException
*/
public function testExceptionIsThrownIfEnvironmentVariableIsInListOfReservedNames($variable)
{

View file

@ -126,7 +126,7 @@ class VariableUpdateServiceTest extends TestCase
* Test that all of the reserved variables defined in the model trigger an exception.
*
* @dataProvider reservedNamesProvider
* @expectedException \Pterodactyl\Exceptions\Services\ServiceVariable\ReservedVariableNameException
* @expectedException \Pterodactyl\Exceptions\Service\ServiceVariable\ReservedVariableNameException
*/
public function testExceptionIsThrownIfEnvironmentVariableIsInListOfReservedNames($variable)
{