accounts/tests/codeception/api/_pages/MojangApiRoute.php
ErickSkrauch df1859f0c1 Реализован функционал Mojang API
Исправлена ошибка доступа к authserver из-за перехода на использование хостов, а не доменов
2016-10-02 01:21:54 +03:00

28 lines
733 B
PHP

<?php
namespace tests\codeception\api\_pages;
use yii\codeception\BasePage;
/**
* @property \tests\codeception\api\FunctionalTester $actor
*/
class MojangApiRoute extends BasePage {
public function usernameToUuid($username, $at = null) {
$this->route = '/mojang/profiles/' . $username;
$params = $at === null ? [] : ['at' => $at];
$this->actor->sendGET($this->getUrl(), $params);
}
public function usernamesByUuid($uuid) {
$this->route = "/mojang/profiles/{$uuid}/names";
$this->actor->sendGET($this->getUrl());
}
public function uuidsByUsernames($uuids) {
$this->route = '/mojang/profiles';
$this->actor->sendPOST($this->getUrl(), $uuids);
}
}