#20 Quick implementation of the https://api.minecraftservices.com/minecraft/profile endpoint [deploy dev]

This commit is contained in:
ErickSkrauch
2022-01-21 21:09:46 +01:00
parent 5b8be60867
commit 31febd5606
4 changed files with 123 additions and 1 deletions

View 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
}