flux-querybuilder/tests/Functions/SortFunctionTest.php

20 lines
425 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace Tests\Functions;
use Arendsen\FluxQueryBuilder\Functions\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());
}
}