diff --git a/tests/Unit/Services/Allocations/AssignmentServiceTest.php b/tests/Unit/Services/Allocations/AssignmentServiceTest.php index 1d479938..f55fdc5f 100644 --- a/tests/Unit/Services/Allocations/AssignmentServiceTest.php +++ b/tests/Unit/Services/Allocations/AssignmentServiceTest.php @@ -71,7 +71,7 @@ class AssignmentServiceTest extends TestCase // // This can also be avoided if tests were run in isolated processes, or if that test // came first, but neither of those are good solutions, so this is the next best option. - PHPMock::defineFunctionMock('\\Pterodactyl\\Service\\Allocations', 'gethostbyname'); + PHPMock::defineFunctionMock('\\Pterodactyl\\Services\\Allocations', 'gethostbyname'); $this->node = factory(Node::class)->make(); $this->connection = m::mock(ConnectionInterface::class); @@ -180,7 +180,7 @@ class AssignmentServiceTest extends TestCase 'allocation_ports' => ['1024'], ]; - $this->getFunctionMock('\\Pterodactyl\\Service\\Allocations', 'gethostbyname') + $this->getFunctionMock('\\Pterodactyl\\Services\\Allocations', 'gethostbyname') ->expects($this->once())->willReturn('192.168.1.1'); $this->connection->shouldReceive('beginTransaction')->withNoArgs()->once()->andReturnNull(); diff --git a/tests/Unit/Services/Api/KeyServiceTest.php b/tests/Unit/Services/Api/KeyServiceTest.php index 0ac71382..33d01cb0 100644 --- a/tests/Unit/Services/Api/KeyServiceTest.php +++ b/tests/Unit/Services/Api/KeyServiceTest.php @@ -81,7 +81,7 @@ class KeyServiceTest extends TestCase */ public function test_create_function() { - $this->getFunctionMock('\\Pterodactyl\\Service\\Api', 'random_bytes') + $this->getFunctionMock('\\Pterodactyl\\Services\\Api', 'random_bytes') ->expects($this->exactly(2)) ->willReturnCallback(function ($bytes) { return hex2bin(str_pad('', $bytes * 2, '0')); diff --git a/tests/Unit/Services/Database/DatabaseManagementServiceTest.php b/tests/Unit/Services/Database/DatabaseManagementServiceTest.php index 2f3f6ace..ca1e29ce 100644 --- a/tests/Unit/Services/Database/DatabaseManagementServiceTest.php +++ b/tests/Unit/Services/Database/DatabaseManagementServiceTest.php @@ -84,7 +84,7 @@ class DatabaseManagementServiceTest extends TestCase $this->encrypter = m::mock(Encrypter::class); $this->repository = m::mock(DatabaseRepositoryInterface::class); - $this->getFunctionMock('\\Pterodactyl\\Service\\Database', 'str_random') + $this->getFunctionMock('\\Pterodactyl\\Services\\Database', 'str_random') ->expects($this->any())->willReturn('str_random'); $this->service = new DatabaseManagementService( diff --git a/tests/Unit/Services/Nodes/CreationServiceTest.php b/tests/Unit/Services/Nodes/CreationServiceTest.php index f3562cc1..84efcbde 100644 --- a/tests/Unit/Services/Nodes/CreationServiceTest.php +++ b/tests/Unit/Services/Nodes/CreationServiceTest.php @@ -61,7 +61,7 @@ class CreationServiceTest extends TestCase */ public function testNodeIsCreatedAndDaemonSecretIsGenerated() { - $this->getFunctionMock('\\Pterodactyl\\Service\\Nodes', 'bin2hex') + $this->getFunctionMock('\\Pterodactyl\\Services\\Nodes', 'bin2hex') ->expects($this->once())->willReturn('hexResult'); $this->repository->shouldReceive('create')->with([ diff --git a/tests/Unit/Services/Nodes/UpdateServiceTest.php b/tests/Unit/Services/Nodes/UpdateServiceTest.php index bb660985..74db802b 100644 --- a/tests/Unit/Services/Nodes/UpdateServiceTest.php +++ b/tests/Unit/Services/Nodes/UpdateServiceTest.php @@ -97,14 +97,14 @@ class UpdateServiceTest extends TestCase */ public function testNodeIsUpdatedAndDaemonSecretIsReset() { - $this->getFunctionMock('\\Pterodactyl\\Service\\Nodes', 'random_bytes') + $this->getFunctionMock('\\Pterodactyl\\Services\\Nodes', 'random_bytes') ->expects($this->once())->willReturnCallback(function ($bytes) { $this->assertEquals(CreationService::DAEMON_SECRET_LENGTH, $bytes); return '\00'; }); - $this->getFunctionMock('\\Pterodactyl\\Service\\Nodes', 'bin2hex') + $this->getFunctionMock('\\Pterodactyl\\Services\\Nodes', 'bin2hex') ->expects($this->once())->willReturn('hexResponse'); $this->repository->shouldReceive('withoutFresh')->withNoArgs()->once()->andReturnSelf() diff --git a/tests/Unit/Services/Servers/CreationServiceTest.php b/tests/Unit/Services/Servers/CreationServiceTest.php index 4cdaea1a..d9a5c245 100644 --- a/tests/Unit/Services/Servers/CreationServiceTest.php +++ b/tests/Unit/Services/Servers/CreationServiceTest.php @@ -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\\Service\\Servers', 'bin2hex') + $this->getFunctionMock('\\Pterodactyl\\Services\\Servers', 'bin2hex') ->expects($this->any())->willReturn('randomstring'); $this->getFunctionMock('\\Ramsey\\Uuid\\Uuid', 'uuid4') diff --git a/tests/Unit/Services/Servers/DetailsModificationServiceTest.php b/tests/Unit/Services/Servers/DetailsModificationServiceTest.php index 916a313c..a617fbaa 100644 --- a/tests/Unit/Services/Servers/DetailsModificationServiceTest.php +++ b/tests/Unit/Services/Servers/DetailsModificationServiceTest.php @@ -84,7 +84,7 @@ class DetailsModificationServiceTest extends TestCase $this->repository = m::mock(ServerRepository::class); $this->writer = m::mock(Writer::class); - $this->getFunctionMock('\\Pterodactyl\\Service\\Servers', 'bin2hex') + $this->getFunctionMock('\\Pterodactyl\\Services\\Servers', 'bin2hex') ->expects($this->any())->willReturn('randomString'); $this->service = new DetailsModificationService( diff --git a/tests/Unit/Services/Servers/UsernameGenerationServiceTest.php b/tests/Unit/Services/Servers/UsernameGenerationServiceTest.php index b3e3f788..c0d80cd5 100644 --- a/tests/Unit/Services/Servers/UsernameGenerationServiceTest.php +++ b/tests/Unit/Services/Servers/UsernameGenerationServiceTest.php @@ -46,10 +46,10 @@ class UsernameGenerationServiceTest extends TestCase $this->service = new UsernameGenerationService(); - $this->getFunctionMock('\\Pterodactyl\\Service\\Servers', 'bin2hex') + $this->getFunctionMock('\\Pterodactyl\\Services\\Servers', 'bin2hex') ->expects($this->any())->willReturn('dddddddd'); - $this->getFunctionMock('\\Pterodactyl\\Service\\Servers', 'str_random') + $this->getFunctionMock('\\Pterodactyl\\Services\\Servers', 'str_random') ->expects($this->any())->willReturnCallback(function ($count) { return str_pad('', $count, 'a'); });