flux-querybuilder/tests/Function/SortFunctionTest.php
davidarendsen 147b2d9017 Add Group, Limit, Map, Sort functions
Signed-off-by: davidarendsen <davidarendsen@hey.com>
2022-08-10 16:09:29 +00:00

18 lines
No EOL
396 B
PHP

<?php
declare(strict_types=1);
use Arendsen\FluxQueryBuilder\Function\Sort;
use PHPUnit\Framework\TestCase;
final class SortFunctionTest extends TestCase {
public function testSimpleSort()
{
$expression = new Sort(['foo', 'bar'], true);
$query = '|> sort(columns: ["foo", "bar"], desc: true) ';
$this->assertEquals($query, $expression->__toString());
}
}