mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Rework tests structure. Upgrade codeception to 2.5.3. Merge params configuration into app configuration.
This commit is contained in:
19
api/tests/_pages/MojangApiRoute.php
Normal file
19
api/tests/_pages/MojangApiRoute.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
namespace api\tests\_pages;
|
||||
|
||||
class MojangApiRoute extends BasePage {
|
||||
|
||||
public function usernameToUuid($username, $at = null) {
|
||||
$params = $at === null ? [] : ['at' => $at];
|
||||
$this->getActor()->sendGET("/api/mojang/profiles/{$username}", $params);
|
||||
}
|
||||
|
||||
public function usernamesByUuid($uuid) {
|
||||
$this->getActor()->sendGET("/api/mojang/profiles/{$uuid}/names");
|
||||
}
|
||||
|
||||
public function uuidsByUsernames($uuids) {
|
||||
$this->getActor()->sendPOST('/api/mojang/profiles', $uuids);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user