Laravel 10 (#4706)
This commit is contained in:
parent
ad4ddc6300
commit
1d38b4f0e2
136 changed files with 1735 additions and 2008 deletions
|
@ -155,7 +155,7 @@ class CreateServerSubuserTest extends ClientApiIntegrationTestCase
|
|||
$response->assertJsonPath('errors.0.detail', 'A user with that email address is already assigned as a subuser for this server.');
|
||||
}
|
||||
|
||||
public function permissionsDataProvider(): array
|
||||
public static function permissionsDataProvider(): array
|
||||
{
|
||||
return [[[]], [[Permission::ACTION_USER_CREATE]]];
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace Pterodactyl\Tests\Integration\Api\Client\Server\Subuser;
|
||||
|
||||
use Mockery;
|
||||
use Ramsey\Uuid\Uuid;
|
||||
use Pterodactyl\Models\User;
|
||||
use Pterodactyl\Models\Subuser;
|
||||
|
@ -25,7 +24,7 @@ class DeleteSubuserTest extends ClientApiIntegrationTestCase
|
|||
*/
|
||||
public function testCorrectSubuserIsDeletedFromServer()
|
||||
{
|
||||
$this->swap(DaemonServerRepository::class, $mock = Mockery::mock(DaemonServerRepository::class));
|
||||
$this->swap(DaemonServerRepository::class, $mock = \Mockery::mock(DaemonServerRepository::class));
|
||||
|
||||
[$user, $server] = $this->generateTestAccount();
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace Pterodactyl\Tests\Integration\Api\Client\Server\Subuser;
|
||||
|
||||
use Mockery;
|
||||
use Pterodactyl\Models\User;
|
||||
use Pterodactyl\Models\Subuser;
|
||||
use Pterodactyl\Repositories\Wings\DaemonServerRepository;
|
||||
|
@ -36,7 +35,7 @@ class SubuserAuthorizationTest extends ClientApiIntegrationTestCase
|
|||
Subuser::factory()->create(['server_id' => $server2->id, 'user_id' => $internal->id]);
|
||||
Subuser::factory()->create(['server_id' => $server3->id, 'user_id' => $internal->id]);
|
||||
|
||||
$this->instance(DaemonServerRepository::class, $mock = Mockery::mock(DaemonServerRepository::class));
|
||||
$this->instance(DaemonServerRepository::class, $mock = \Mockery::mock(DaemonServerRepository::class));
|
||||
if ($method === 'DELETE') {
|
||||
$mock->expects('setServer->revokeUserJTI')->with($internal->id)->andReturnUndefined();
|
||||
}
|
||||
|
@ -50,7 +49,7 @@ class SubuserAuthorizationTest extends ClientApiIntegrationTestCase
|
|||
$this->actingAs($user)->json($method, $this->link($server3, '/users/' . $internal->uuid))->assertNotFound();
|
||||
}
|
||||
|
||||
public function methodDataProvider(): array
|
||||
public static function methodDataProvider(): array
|
||||
{
|
||||
return [['GET'], ['POST'], ['DELETE']];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue