| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function testAvg(): void |
||
| 16 | { |
||
| 17 | $this->insertDocumentWithNumber(5, 5); |
||
| 18 | $this->insertDocumentWithNumber(4, 10); |
||
| 19 | $this->insertDocumentWithNumber(3, 15); |
||
| 20 | $this->insertDocumentWithNumber(2, 20); |
||
| 21 | $this->insertDocumentWithNumber(1, 25); |
||
| 22 | |||
| 23 | /** @var ResponseInterface $res */ |
||
| 24 | $res = $this->r() |
||
| 25 | ->table('tabletest') |
||
| 26 | ->avg('number') |
||
| 27 | ->run(); |
||
| 28 | |||
| 29 | $this->assertEquals(15, $res->getData()); |
||
| 30 | } |
||
| 32 |