| Total Complexity | 2 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class OrderByTest extends AbstractTableTest |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @return void |
||
| 13 | * @throws \Exception |
||
| 14 | */ |
||
| 15 | public function testOrderByDesc(): void |
||
| 16 | { |
||
| 17 | $this->insertDocument(5); |
||
| 18 | $this->insertDocument(4); |
||
| 19 | $this->insertDocument(3); |
||
| 20 | $this->insertDocument(2); |
||
| 21 | $this->insertDocument(1); |
||
| 22 | |||
| 23 | /** @var ResponseInterface $res */ |
||
| 24 | $res = $this->r() |
||
| 25 | ->table('tabletest') |
||
| 26 | ->orderBy($this->r()->desc('id')) |
||
| 27 | ->run(); |
||
| 28 | |||
| 29 | $this->assertArraySubset(['id' => 5], $res->getData()[0]); |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @return void |
||
| 34 | * @throws \Exception |
||
| 35 | */ |
||
| 36 | public function testOrderByAsc(): void |
||
| 51 | } |
||
| 52 | } |
||
| 53 |