Skip to content

Commit 47eec03

Browse files
committed
Fix broken tests due to grapping around...
1 parent cdfbc60 commit 47eec03

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

tests/Unit/Services/Allocations/AssignmentServiceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function setUp()
7171
//
7272
// This can also be avoided if tests were run in isolated processes, or if that test
7373
// came first, but neither of those are good solutions, so this is the next best option.
74-
PHPMock::defineFunctionMock('\\Pterodactyl\\Service\\Allocations', 'gethostbyname');
74+
PHPMock::defineFunctionMock('\\Pterodactyl\\Services\\Allocations', 'gethostbyname');
7575

7676
$this->node = factory(Node::class)->make();
7777
$this->connection = m::mock(ConnectionInterface::class);
@@ -180,7 +180,7 @@ public function testDomainNamePassedInPlaceOfIPAddress()
180180
'allocation_ports' => ['1024'],
181181
];
182182

183-
$this->getFunctionMock('\\Pterodactyl\\Service\\Allocations', 'gethostbyname')
183+
$this->getFunctionMock('\\Pterodactyl\\Services\\Allocations', 'gethostbyname')
184184
->expects($this->once())->willReturn('192.168.1.1');
185185

186186
$this->connection->shouldReceive('beginTransaction')->withNoArgs()->once()->andReturnNull();

tests/Unit/Services/Api/KeyServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function setUp()
8181
*/
8282
public function test_create_function()
8383
{
84-
$this->getFunctionMock('\\Pterodactyl\\Service\\Api', 'random_bytes')
84+
$this->getFunctionMock('\\Pterodactyl\\Services\\Api', 'random_bytes')
8585
->expects($this->exactly(2))
8686
->willReturnCallback(function ($bytes) {
8787
return hex2bin(str_pad('', $bytes * 2, '0'));

tests/Unit/Services/Database/DatabaseManagementServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function setUp()
8484
$this->encrypter = m::mock(Encrypter::class);
8585
$this->repository = m::mock(DatabaseRepositoryInterface::class);
8686

87-
$this->getFunctionMock('\\Pterodactyl\\Service\\Database', 'str_random')
87+
$this->getFunctionMock('\\Pterodactyl\\Services\\Database', 'str_random')
8888
->expects($this->any())->willReturn('str_random');
8989

9090
$this->service = new DatabaseManagementService(

tests/Unit/Services/Nodes/CreationServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function setUp()
6161
*/
6262
public function testNodeIsCreatedAndDaemonSecretIsGenerated()
6363
{
64-
$this->getFunctionMock('\\Pterodactyl\\Service\\Nodes', 'bin2hex')
64+
$this->getFunctionMock('\\Pterodactyl\\Services\\Nodes', 'bin2hex')
6565
->expects($this->once())->willReturn('hexResult');
6666

6767
$this->repository->shouldReceive('create')->with([

tests/Unit/Services/Nodes/UpdateServiceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ public function setUp()
9797
*/
9898
public function testNodeIsUpdatedAndDaemonSecretIsReset()
9999
{
100-
$this->getFunctionMock('\\Pterodactyl\\Service\\Nodes', 'random_bytes')
100+
$this->getFunctionMock('\\Pterodactyl\\Services\\Nodes', 'random_bytes')
101101
->expects($this->once())->willReturnCallback(function ($bytes) {
102102
$this->assertEquals(CreationService::DAEMON_SECRET_LENGTH, $bytes);
103103

104104
return '\00';
105105
});
106106

107-
$this->getFunctionMock('\\Pterodactyl\\Service\\Nodes', 'bin2hex')
107+
$this->getFunctionMock('\\Pterodactyl\\Services\\Nodes', 'bin2hex')
108108
->expects($this->once())->willReturn('hexResponse');
109109

110110
$this->repository->shouldReceive('withoutFresh')->withNoArgs()->once()->andReturnSelf()

tests/Unit/Services/Servers/CreationServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public function setUp()
155155
$this->uuid = m::mock('overload:Ramsey\Uuid\Uuid');
156156
$this->writer = m::mock(Writer::class);
157157

158-
$this->getFunctionMock('\\Pterodactyl\\Service\\Servers', 'bin2hex')
158+
$this->getFunctionMock('\\Pterodactyl\\Services\\Servers', 'bin2hex')
159159
->expects($this->any())->willReturn('randomstring');
160160

161161
$this->getFunctionMock('\\Ramsey\\Uuid\\Uuid', 'uuid4')

tests/Unit/Services/Servers/DetailsModificationServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function setUp()
8484
$this->repository = m::mock(ServerRepository::class);
8585
$this->writer = m::mock(Writer::class);
8686

87-
$this->getFunctionMock('\\Pterodactyl\\Service\\Servers', 'bin2hex')
87+
$this->getFunctionMock('\\Pterodactyl\\Services\\Servers', 'bin2hex')
8888
->expects($this->any())->willReturn('randomString');
8989

9090
$this->service = new DetailsModificationService(

tests/Unit/Services/Servers/UsernameGenerationServiceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ public function setUp()
4646

4747
$this->service = new UsernameGenerationService();
4848

49-
$this->getFunctionMock('\\Pterodactyl\\Service\\Servers', 'bin2hex')
49+
$this->getFunctionMock('\\Pterodactyl\\Services\\Servers', 'bin2hex')
5050
->expects($this->any())->willReturn('dddddddd');
5151

52-
$this->getFunctionMock('\\Pterodactyl\\Service\\Servers', 'str_random')
52+
$this->getFunctionMock('\\Pterodactyl\\Services\\Servers', 'str_random')
5353
->expects($this->any())->willReturnCallback(function ($count) {
5454
return str_pad('', $count, 'a');
5555
});

0 commit comments

Comments
 (0)