mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-03 18:04:08 +02:00
fix unit test
This commit is contained in:
parent
8ad52f1794
commit
2115d4e117
1 changed files with 3 additions and 2 deletions
|
|
@ -184,11 +184,12 @@ class DemoListProviderTest extends TestCase {
|
||||||
$this->userProvider->store($steamId);
|
$this->userProvider->store($steamId);
|
||||||
$userId = $this->userProvider->get($steamId->getSteamId64())->getId();
|
$userId = $this->userProvider->get($steamId->getSteamId64())->getId();
|
||||||
$id1 = $this->demoProvider->storeDemo($this->getDemo($userId, 'map1', 12), 'foo1', 'bar');
|
$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');
|
$id3 = $this->demoProvider->storeDemo($this->getDemo($userId + 1, 'map1', 12), 'foo2', 'bar');
|
||||||
|
|
||||||
$list = $this->demoListProvider->listUploads($steamId->getSteamId64(), 1, ['backend' => 'foo2']);
|
$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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue