mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
#20 Quick implementation of the https://api.minecraftservices.com/minecraft/profile endpoint [deploy dev]
This commit is contained in:
34
api/tests/functional/mojang/ProfileCest.php
Normal file
34
api/tests/functional/mojang/ProfileCest.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace api\tests\functional\mojang;
|
||||
|
||||
use api\tests\FunctionalTester;
|
||||
|
||||
class ProfileCest {
|
||||
|
||||
public function getProfile(FunctionalTester $I): void {
|
||||
$I->amAuthenticated();
|
||||
$I->sendGet('/api/mojang/services/minecraft/profile');
|
||||
$I->canSeeResponseCodeIs(200);
|
||||
$I->canSeeResponseIsJson();
|
||||
$I->canSeeResponseContainsJson([
|
||||
'id' => 'df936908b2e1544d96f82977ec213022',
|
||||
'name' => 'Admin',
|
||||
'skins' => [
|
||||
[
|
||||
'id' => '1794a784-2d87-32f0-b233-0b2fd5682444',
|
||||
'state' => 'ACTIVE',
|
||||
'url' => 'http://localhost/skin.png',
|
||||
'variant' => 'CLASSIC',
|
||||
'alias' => '',
|
||||
],
|
||||
],
|
||||
'capes' => [],
|
||||
]);
|
||||
}
|
||||
|
||||
// TODO: add cases for unauthenticated user
|
||||
// TODO: add cases for authenticated as a service account user
|
||||
|
||||
}
|
Reference in New Issue
Block a user