1
0
Fork 0
mirror of https://codeberg.org/demostf/api.git synced 2026-06-03 09:54:17 +02:00

dont rely on the steam api for getting user names

This commit is contained in:
Robin Appelman 2020-11-29 20:06:49 +01:00
commit fd9a7e8527
13 changed files with 54 additions and 78 deletions

View file

@ -226,7 +226,7 @@ class UploadProviderTest extends TestCase {
file_put_contents($this->tmpDir . '/foo.dem', 'asd');
$steamId = $this->getSteamId('123', 'a');
$token = $this->userProvider->store($steamId);
$token = $this->userProvider->store($steamId, 'a');
$this->uploadProvider->upload($token, 'RED', 'BLU', 'dummy', $this->tmpDir . '/foo.dem');
}
@ -262,7 +262,7 @@ class UploadProviderTest extends TestCase {
);
$steamId = $this->getSteamId('123', 'a');
$token = $this->userProvider->store($steamId);
$token = $this->userProvider->store($steamId, 'a');
$this->assertEquals(
'STV available at: http://example.com/' . $id,
@ -272,7 +272,7 @@ class UploadProviderTest extends TestCase {
private function saveSteamId($steamId, $name) {
$steamId = $this->getSteamId(Parser::convertSteamIdToCommunityId($steamId), $name);
$this->userProvider->store($steamId);
$this->userProvider->store($steamId, $name);
}
public function testUpload() {
@ -280,7 +280,7 @@ class UploadProviderTest extends TestCase {
copy(__DIR__ . '/../data/product-raw.json', $this->tmpDir . '/foo-raw.json');
$steamId = $this->getSteamId('123', 'a');
$token = $this->userProvider->store($steamId);
$token = $this->userProvider->store($steamId, 'a');
// pre-save the names so we dont have to get them from steam
$this->saveSteamId('[U:1:64229260]', 'Icewind');