Merge branch 'tests_refactoring' into develop

This commit is contained in:
ErickSkrauch
2016-11-01 19:49:14 +03:00
64 changed files with 689 additions and 852 deletions

View File

@@ -37,7 +37,7 @@ class AccountQueueController extends AmqpController {
}
public function routeUsernameChanged(UsernameChanged $body) {
$mojangApi = new MojangApi();
$mojangApi = $this->createMojangApi();
try {
$response = $mojangApi->usernameToUUID($body->newUsername);
} catch (NoContentException $e) {
@@ -68,4 +68,11 @@ class AccountQueueController extends AmqpController {
return true;
}
/**
* @return MojangApi
*/
protected function createMojangApi() : MojangApi {
return new MojangApi();
}
}