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

fix unit test

This commit is contained in:
Robin Appelman 2018-09-19 23:38:59 +02:00
commit 2115d4e117

View file

@ -184,11 +184,12 @@ class DemoListProviderTest extends TestCase {
$this->userProvider->store($steamId);
$userId = $this->userProvider->get($steamId->getSteamId64())->getId();
$id1 = $this->demoProvider->storeDemo($this->getDemo($userId, 'map1', 12), 'foo1', 'bar');
$id2 = $this->demoProvider->storeDemo($this->getDemo($userId, 'map2', 18), 'foo1', 'bar');
$id2 = $this->demoProvider->storeDemo($this->getDemo($userId, 'map2', 18), 'foo2', 'bar');
$id3 = $this->demoProvider->storeDemo($this->getDemo($userId + 1, 'map1', 12), 'foo2', 'bar');
$list = $this->demoListProvider->listUploads($steamId->getSteamId64(), 1, ['backend' => 'foo2']);
$this->assertEquals($id3, $list[0]->getId());
$this->assertCount(1, $list);
$this->assertEquals($id2, $list[0]->getId());
}
}