mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 06:43:45 +02:00
Begin moving packs to new service mechanisms, refactor exceptions for services
This commit is contained in:
@@ -155,7 +155,7 @@ class CreationServiceTest extends TestCase
|
||||
$this->uuid = m::mock('overload:Ramsey\Uuid\Uuid');
|
||||
$this->writer = m::mock(Writer::class);
|
||||
|
||||
$this->getFunctionMock('\\Pterodactyl\\Services\\Servers', 'bin2hex')
|
||||
$this->getFunctionMock('\\Pterodactyl\\Service\\Servers', 'bin2hex')
|
||||
->expects($this->any())->willReturn('randomstring');
|
||||
|
||||
$this->getFunctionMock('\\Ramsey\\Uuid\\Uuid', 'uuid4')
|
||||
|
||||
@@ -84,7 +84,7 @@ class DetailsModificationServiceTest extends TestCase
|
||||
$this->repository = m::mock(ServerRepository::class);
|
||||
$this->writer = m::mock(Writer::class);
|
||||
|
||||
$this->getFunctionMock('\\Pterodactyl\\Services\\Servers', 'bin2hex')
|
||||
$this->getFunctionMock('\\Pterodactyl\\Service\\Servers', 'bin2hex')
|
||||
->expects($this->any())->willReturn('randomString');
|
||||
|
||||
$this->service = new DetailsModificationService(
|
||||
|
||||
@@ -46,10 +46,10 @@ class UsernameGenerationServiceTest extends TestCase
|
||||
|
||||
$this->service = new UsernameGenerationService();
|
||||
|
||||
$this->getFunctionMock('\\Pterodactyl\\Services\\Servers', 'bin2hex')
|
||||
$this->getFunctionMock('\\Pterodactyl\\Service\\Servers', 'bin2hex')
|
||||
->expects($this->any())->willReturn('dddddddd');
|
||||
|
||||
$this->getFunctionMock('\\Pterodactyl\\Services\\Servers', 'str_random')
|
||||
$this->getFunctionMock('\\Pterodactyl\\Service\\Servers', 'str_random')
|
||||
->expects($this->any())->willReturnCallback(function ($count) {
|
||||
return str_pad('', $count, 'a');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user