mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-03 18:04:08 +02:00
add tests for clean map search
This commit is contained in:
parent
7a68627054
commit
0b4a74eef5
1 changed files with 14 additions and 0 deletions
|
|
@ -82,6 +82,20 @@ class DemoListProviderTest extends TestCase {
|
||||||
$this->assertEquals($id1, $list[1]->getId());
|
$this->assertEquals($id1, $list[1]->getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testFilterMapCleaned() {
|
||||||
|
$id1 = $this->demoProvider->storeDemo($this->getDemo(1, 'map_foo_b2'), 'foo', 'bar');
|
||||||
|
$id2 = $this->demoProvider->storeDemo($this->getDemo(1, 'map_bar'), 'foo', 'bar');
|
||||||
|
$id3 = $this->demoProvider->storeDemo($this->getDemo(1, 'map_foo'), 'foo', 'bar');
|
||||||
|
$id4 = $this->demoProvider->storeDemo($this->getDemo(1, 'map_foo_final1'), 'foo', 'bar');
|
||||||
|
|
||||||
|
$list = $this->demoListProvider->listDemos(1, ['map' => 'map_foo']);
|
||||||
|
$this->assertCount(3, $list);
|
||||||
|
|
||||||
|
$this->assertEquals($id4, $list[0]->getId());
|
||||||
|
$this->assertEquals($id3, $list[1]->getId());
|
||||||
|
$this->assertEquals($id1, $list[2]->getId());
|
||||||
|
}
|
||||||
|
|
||||||
public function testFilterPlayerCount() {
|
public function testFilterPlayerCount() {
|
||||||
$id1 = $this->demoProvider->storeDemo($this->getDemo(1, 'map1', 17), 'foo', 'bar');
|
$id1 = $this->demoProvider->storeDemo($this->getDemo(1, 'map1', 17), 'foo', 'bar');
|
||||||
$id2 = $this->demoProvider->storeDemo($this->getDemo(1, 'map2', 18), 'foo', 'bar');
|
$id2 = $this->demoProvider->storeDemo($this->getDemo(1, 'map2', 18), 'foo', 'bar');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue