| Conditions | 1 |
| Paths | 1 |
| Total Lines | 24 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function testLimit(): void |
||
| 15 | { |
||
| 16 | $this->insertDocument(5); |
||
| 17 | $this->insertDocument(4); |
||
| 18 | $this->insertDocument(3); |
||
| 19 | $this->insertDocument(2); |
||
| 20 | $this->insertDocument(1); |
||
| 21 | |||
| 22 | /** @var ResponseInterface $res */ |
||
| 23 | $res = $this->r() |
||
| 24 | ->table('tabletest') |
||
| 25 | ->orderby($this->r()->ordening('id')) |
||
|
|
|||
| 26 | ->run(); |
||
| 27 | |||
| 28 | |||
| 29 | $this->assertArraySubset(['id' => 5], $res->getData()[0]); |
||
| 30 | |||
| 31 | /** @var ResponseInterface $res */ |
||
| 32 | $res = $this->r() |
||
| 33 | ->table('tabletest') |
||
| 34 | ->orderby('id') |
||
| 35 | ->run(); |
||
| 36 | |||
| 37 | $this->assertArraySubset(['id' => 1], $res->getData()[0]); |
||
| 38 | } |
||
| 40 |